Coverage Report

Created: 2026-09-17 13:03

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
be/src/exec/operator/operator.cpp
Line
Count
Source
1
// Licensed to the Apache Software Foundation (ASF) under one
2
// or more contributor license agreements.  See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership.  The ASF licenses this file
5
// to you under the Apache License, Version 2.0 (the
6
// "License"); you may not use this file except in compliance
7
// with the License.  You may obtain a copy of the License at
8
//
9
//   http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing,
12
// software distributed under the License is distributed on an
13
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
// KIND, either express or implied.  See the License for the
15
// specific language governing permissions and limitations
16
// under the License.
17
18
#include "exec/operator/operator.h"
19
20
#include <algorithm>
21
22
#include "common/status.h"
23
#include "exec/common/util.hpp"
24
#include "exec/exchange/local_exchange_sink_operator.h"
25
#include "exec/exchange/local_exchange_source_operator.h"
26
#include "exec/operator/aggregation_sink_operator.h"
27
#include "exec/operator/aggregation_source_operator.h"
28
#include "exec/operator/analytic_sink_operator.h"
29
#include "exec/operator/analytic_source_operator.h"
30
#include "exec/operator/assert_num_rows_operator.h"
31
#include "exec/operator/blackhole_sink_operator.h"
32
#include "exec/operator/bucketed_aggregation_sink_operator.h"
33
#include "exec/operator/bucketed_aggregation_source_operator.h"
34
#include "exec/operator/cache_sink_operator.h"
35
#include "exec/operator/cache_source_operator.h"
36
#include "exec/operator/datagen_operator.h"
37
#include "exec/operator/dict_sink_operator.h"
38
#include "exec/operator/distinct_streaming_aggregation_operator.h"
39
#include "exec/operator/empty_set_operator.h"
40
#include "exec/operator/exchange_sink_operator.h"
41
#include "exec/operator/exchange_source_operator.h"
42
#include "exec/operator/file_scan_operator.h"
43
#include "exec/operator/group_commit_block_sink_operator.h"
44
#include "exec/operator/group_commit_scan_operator.h"
45
#include "exec/operator/hashjoin_build_sink.h"
46
#include "exec/operator/hashjoin_probe_operator.h"
47
#include "exec/operator/hive_table_sink_operator.h"
48
#include "exec/operator/iceberg_delete_sink_operator.h"
49
#include "exec/operator/iceberg_merge_sink_operator.h"
50
#include "exec/operator/iceberg_table_sink_operator.h"
51
#include "exec/operator/jdbc_scan_operator.h"
52
#include "exec/operator/jdbc_table_sink_operator.h"
53
#include "exec/operator/local_merge_sort_source_operator.h"
54
#include "exec/operator/materialization_opertor.h"
55
#include "exec/operator/maxcompute_table_sink_operator.h"
56
#include "exec/operator/memory_scratch_sink_operator.h"
57
#include "exec/operator/meta_scan_operator.h"
58
#include "exec/operator/mock_operator.h"
59
#include "exec/operator/mock_scan_operator.h"
60
#include "exec/operator/multi_cast_data_stream_sink.h"
61
#include "exec/operator/multi_cast_data_stream_source.h"
62
#include "exec/operator/nested_loop_join_build_operator.h"
63
#include "exec/operator/nested_loop_join_probe_operator.h"
64
#include "exec/operator/olap_scan_operator.h"
65
#include "exec/operator/olap_table_sink_operator.h"
66
#include "exec/operator/olap_table_sink_v2_operator.h"
67
#include "exec/operator/partition_sort_sink_operator.h"
68
#include "exec/operator/partition_sort_source_operator.h"
69
#include "exec/operator/partitioned_aggregation_sink_operator.h"
70
#include "exec/operator/partitioned_aggregation_source_operator.h"
71
#include "exec/operator/partitioned_hash_join_probe_operator.h"
72
#include "exec/operator/partitioned_hash_join_sink_operator.h"
73
#include "exec/operator/rec_cte_anchor_sink_operator.h"
74
#include "exec/operator/rec_cte_scan_operator.h"
75
#include "exec/operator/rec_cte_sink_operator.h"
76
#include "exec/operator/rec_cte_source_operator.h"
77
#include "exec/operator/repeat_operator.h"
78
#include "exec/operator/result_file_sink_operator.h"
79
#include "exec/operator/result_sink_operator.h"
80
#include "exec/operator/schema_scan_operator.h"
81
#include "exec/operator/select_operator.h"
82
#include "exec/operator/set_probe_sink_operator.h"
83
#include "exec/operator/set_sink_operator.h"
84
#include "exec/operator/set_source_operator.h"
85
#include "exec/operator/sort_sink_operator.h"
86
#include "exec/operator/sort_source_operator.h"
87
#include "exec/operator/spill_iceberg_table_sink_operator.h"
88
#include "exec/operator/spill_sort_sink_operator.h"
89
#include "exec/operator/spill_sort_source_operator.h"
90
#include "exec/operator/streaming_aggregation_operator.h"
91
#include "exec/operator/table_function_operator.h"
92
#include "exec/operator/tvf_table_sink_operator.h"
93
#include "exec/operator/union_sink_operator.h"
94
#include "exec/operator/union_source_operator.h"
95
#include "exec/pipeline/dependency.h"
96
#include "exec/pipeline/pipeline.h"
97
#include "exprs/vexpr.h"
98
#include "exprs/vexpr_context.h"
99
#include "runtime/runtime_profile.h"
100
#include "runtime/runtime_profile_counter_names.h"
101
#include "util/debug_util.h"
102
#include "util/string_util.h"
103
104
namespace doris {
105
class RowDescriptor;
106
class RuntimeState;
107
} // namespace doris
108
109
namespace doris {
110
111
0
Status OperatorBase::close(RuntimeState* state) {
112
0
    if (_is_closed) {
113
0
        return Status::OK();
114
0
    }
115
0
    _is_closed = true;
116
0
    return Status::OK();
117
0
}
118
119
template <typename SharedStateArg>
120
1.64M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.64M
    if (_parent->nereids_id() == -1) {
122
861k
        return fmt::format("(id={})", _parent->node_id());
123
861k
    } else {
124
785k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
785k
    }
126
1.64M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
72.7k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
72.7k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
72.7k
    } else {
124
72.7k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
72.7k
    }
126
72.7k
}
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
1
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1
    if (_parent->nereids_id() == -1) {
122
1
        return fmt::format("(id={})", _parent->node_id());
123
1
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
1
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
194k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
194k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
194k
    } else {
124
194k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
194k
    }
126
194k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
28
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
28
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
28
    } else {
124
28
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
28
    }
126
28
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.41k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.41k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
6.41k
    } else {
124
6.41k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
6.41k
    }
126
6.41k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
9.25k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
9.25k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
9.24k
    } else {
124
9.24k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
9.24k
    }
126
9.25k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
91.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
91.5k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
91.4k
    } else {
124
91.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
91.4k
    }
126
91.5k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
47.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
47.9k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
47.9k
    } else {
124
47.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
47.9k
    }
126
47.9k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
230
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
230
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
230
    } else {
124
230
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
230
    }
126
230
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
563k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
563k
    if (_parent->nereids_id() == -1) {
122
261k
        return fmt::format("(id={})", _parent->node_id());
123
302k
    } else {
124
302k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
302k
    }
126
563k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.4k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
54.3k
    } else {
124
54.3k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.3k
    }
126
54.4k
}
_ZNK5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
26
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
26
    if (_parent->nereids_id() == -1) {
122
26
        return fmt::format("(id={})", _parent->node_id());
123
26
    } else {
124
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
0
    }
126
26
}
_ZNK5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
6.02k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.02k
    if (_parent->nereids_id() == -1) {
122
6.02k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
6.02k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
716
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
716
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
614
    } else {
124
614
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
614
    }
126
716
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
4.83k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
4.83k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
4.81k
    } else {
124
4.81k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
4.81k
    }
126
4.83k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
593k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
593k
    if (_parent->nereids_id() == -1) {
122
593k
        return fmt::format("(id={})", _parent->node_id());
123
18.4E
    } else {
124
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
18.4E
    }
126
593k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
168
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
168
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
168
    } else {
124
168
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
168
    }
126
168
}
127
128
template <typename SharedStateArg>
129
1.12M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.12M
    if (_parent->nereids_id() == -1) {
131
644k
        return fmt::format("(id={})", _parent->node_id());
132
644k
    } else {
133
482k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
482k
    }
135
1.12M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
121k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
121k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
121k
    } else {
133
121k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
121k
    }
135
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
195k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
195k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
195k
    } else {
133
195k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
195k
    }
135
195k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
35
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
35
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
35
    } else {
133
35
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
35
    }
135
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6.50k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6.50k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
6.50k
    } else {
133
6.50k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
6.50k
    }
135
6.50k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
9.23k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
9.23k
    if (_parent->nereids_id() == -1) {
131
12
        return fmt::format("(id={})", _parent->node_id());
132
9.22k
    } else {
133
9.22k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
9.22k
    }
135
9.23k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
91.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
91.9k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
91.9k
    } else {
133
91.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
91.9k
    }
135
91.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
47.8k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
47.8k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
47.8k
    } else {
133
47.8k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
47.8k
    }
135
47.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
239
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
239
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
239
    } else {
133
239
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
239
    }
135
239
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
47
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
48
    if (_parent->nereids_id() == -1) {
131
48
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
47
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
8.79k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
8.79k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
8.79k
    } else {
133
8.79k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
8.79k
    }
135
8.79k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
731
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
731
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
629
    } else {
133
629
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
629
    }
135
731
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
12.3k
    if (_parent->nereids_id() == -1) {
131
12.3k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
12.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
248k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
248k
    if (_parent->nereids_id() == -1) {
131
248k
        return fmt::format("(id={})", _parent->node_id());
132
18.4E
    } else {
133
18.4E
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
18.4E
    }
135
248k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
383k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
383k
    if (_parent->nereids_id() == -1) {
131
383k
        return fmt::format("(id={})", _parent->node_id());
132
383k
    } else {
133
162
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
162
    }
135
383k
}
_ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
25
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
25
    if (_parent->nereids_id() == -1) {
131
25
        return fmt::format("(id={})", _parent->node_id());
132
25
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
25
}
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
338
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
338
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
338
    } else {
133
338
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
338
    }
135
338
}
136
137
template <typename SharedStateArg>
138
32.2k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
32.2k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
32.2k
    _terminated = true;
143
32.2k
    return Status::OK();
144
32.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.1k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.1k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.1k
    _terminated = true;
143
24.1k
    return Status::OK();
144
24.1k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3.23k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3.23k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3.23k
    _terminated = true;
143
3.23k
    return Status::OK();
144
3.23k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
5
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
5
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
5
    _terminated = true;
143
5
    return Status::OK();
144
5
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.19k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.19k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.19k
    _terminated = true;
143
2.19k
    return Status::OK();
144
2.19k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.07k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.07k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.07k
    _terminated = true;
143
1.07k
    return Status::OK();
144
1.07k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
679
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
679
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
679
    _terminated = true;
143
679
    return Status::OK();
144
679
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
209
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
209
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
209
    _terminated = true;
143
209
    return Status::OK();
144
209
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
3
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
3
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
3
    _terminated = true;
143
3
    return Status::OK();
144
3
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
260
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
260
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
260
    _terminated = true;
143
260
    return Status::OK();
144
260
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
11
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
11
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
11
    _terminated = true;
143
11
    return Status::OK();
144
11
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
295
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
295
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
295
    _terminated = true;
143
295
    return Status::OK();
144
295
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
135
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
135
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
135
    _terminated = true;
143
135
    return Status::OK();
144
135
}
145
146
306k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
306k
    return _child && _child->is_serial_operator() && !is_source()
148
306k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
306k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
306k
}
151
152
25.6k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
25.6k
    if (!_child) {
154
24.1k
        return false;
155
24.1k
    }
156
1.42k
    if (_child->is_serial_operator()) {
157
236
        return true;
158
236
    }
159
1.18k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.18k
    return child_distribution.need_local_exchange() &&
161
1.18k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.42k
}
163
164
template <typename SharedStateArg>
165
15.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
15.8k
    fmt::memory_buffer debug_string_buffer;
167
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
15.8k
    return fmt::to_string(debug_string_buffer);
169
15.8k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
3
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
3
    fmt::memory_buffer debug_string_buffer;
167
3
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
3
    return fmt::to_string(debug_string_buffer);
169
3
}
_ZNK5doris19PipelineXLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
16
    fmt::memory_buffer debug_string_buffer;
167
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
16
    return fmt::to_string(debug_string_buffer);
169
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
16
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
16
    fmt::memory_buffer debug_string_buffer;
167
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
16
    return fmt::to_string(debug_string_buffer);
169
16
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
15.8k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
15.8k
    fmt::memory_buffer debug_string_buffer;
167
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
15.8k
    return fmt::to_string(debug_string_buffer);
169
15.8k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
1
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
1
    fmt::memory_buffer debug_string_buffer;
167
1
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
1
    return fmt::to_string(debug_string_buffer);
169
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
165
32
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
32
    fmt::memory_buffer debug_string_buffer;
167
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
32
    return fmt::to_string(debug_string_buffer);
169
32
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
15.8k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
15.8k
    fmt::memory_buffer debug_string_buffer;
174
15.8k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
15.8k
    return fmt::to_string(debug_string_buffer);
176
15.8k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16
    fmt::memory_buffer debug_string_buffer;
174
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16
    return fmt::to_string(debug_string_buffer);
176
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
16
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
16
    fmt::memory_buffer debug_string_buffer;
174
16
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
16
    return fmt::to_string(debug_string_buffer);
176
16
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
32
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
32
    fmt::memory_buffer debug_string_buffer;
174
32
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
32
    return fmt::to_string(debug_string_buffer);
176
32
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
17
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
17
    fmt::memory_buffer debug_string_buffer;
174
17
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
17
    return fmt::to_string(debug_string_buffer);
176
17
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
15.7k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
15.7k
    fmt::memory_buffer debug_string_buffer;
174
15.7k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
15.7k
    return fmt::to_string(debug_string_buffer);
176
15.7k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
15.9k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
15.9k
    fmt::memory_buffer debug_string_buffer;
180
15.9k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
15.9k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
15.9k
                   _is_serial_operator);
183
15.9k
    return fmt::to_string(debug_string_buffer);
184
15.9k
}
185
186
15.8k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
15.8k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
15.8k
}
189
190
656k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
656k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
656k
    _nereids_id = tnode.nereids_id;
193
656k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
3.88k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
3.88k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
3.88k
            tnode.intermediate_projections_list.size()) {
199
0
            return Status::InternalError(
200
0
                    "intermediate_output_tuple_id_list size:{} not match "
201
0
                    "intermediate_projections_list size:{}",
202
0
                    tnode.intermediate_output_tuple_id_list.size(),
203
0
                    tnode.intermediate_projections_list.size());
204
0
        }
205
3.88k
    }
206
656k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
656k
    _op_name = substr + "_OPERATOR";
208
209
656k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
656k
    } else if (tnode.__isset.conjuncts) {
212
273k
        for (const auto& conjunct : tnode.conjuncts) {
213
273k
            VExprContextSPtr context;
214
273k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
273k
            _conjuncts.emplace_back(context);
216
273k
        }
217
99.0k
    }
218
219
    // create the projections expr
220
656k
    if (tnode.__isset.projections) {
221
261k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
261k
    }
223
656k
    if (!tnode.intermediate_projections_list.empty()) {
224
3.88k
        DCHECK(has_projection()) << "no final projections";
225
3.88k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
6.62k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
6.62k
            VExprContextSPtrs projections;
228
6.62k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
6.62k
            _projection->intermediate_projections.push_back(projections);
230
6.62k
        }
231
3.88k
    }
232
656k
    return Status::OK();
233
656k
}
234
235
683k
Status OperatorXBase::prepare(RuntimeState* state) {
236
683k
    for (auto& conjunct : _conjuncts) {
237
272k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
272k
    }
239
683k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
633k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
339k
            return a->execute_cost() < b->execute_cost();
242
339k
        });
243
633k
    };
244
245
683k
    if (has_projection()) {
246
261k
        auto& projection = *_projection;
247
267k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
6.63k
            const auto& input_row_desc =
249
6.63k
                    i == 0 ? operator_row_desc_before_projection()
250
6.63k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
6.63k
            RETURN_IF_ERROR(
252
6.63k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
6.63k
        }
254
261k
        const auto& final_projection_input_row_desc =
255
261k
                projection.intermediate_output_row_descriptors.empty()
256
261k
                        ? operator_row_desc_before_projection()
257
261k
                        : projection.intermediate_output_row_descriptors.back();
258
261k
        RETURN_IF_ERROR(
259
261k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
261k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
261k
                                                      projection.output_row_descriptor));
262
261k
    }
263
264
683k
    for (auto& conjunct : _conjuncts) {
265
272k
        RETURN_IF_ERROR(conjunct->open(state));
266
272k
    }
267
683k
    if (has_projection()) {
268
261k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
261k
        for (auto& projections : _projection->intermediate_projections) {
270
6.62k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
6.62k
        }
272
261k
    }
273
683k
    if (_child && !is_source()) {
274
98.1k
        RETURN_IF_ERROR(_child->prepare(state));
275
98.1k
    }
276
277
683k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
683k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
683k
    return Status::OK();
283
683k
}
284
285
9.18k
Status OperatorXBase::terminate(RuntimeState* state) {
286
9.18k
    if (_child && !is_source()) {
287
977
        RETURN_IF_ERROR(_child->terminate(state));
288
977
    }
289
9.18k
    auto result = state->get_local_state_result(operator_id());
290
9.18k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
9.18k
    return result.value()->terminate(state);
294
9.18k
}
295
296
4.51M
Status OperatorXBase::close(RuntimeState* state) {
297
4.51M
    if (_child && !is_source()) {
298
743k
        RETURN_IF_ERROR(_child->close(state));
299
743k
    }
300
4.51M
    auto result = state->get_local_state_result(operator_id());
301
4.51M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.51M
    return result.value()->close(state);
305
4.51M
}
306
307
303k
void PipelineXLocalStateBase::clear_origin_block() {
308
303k
    _origin_block.clear_column_data(
309
303k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
303k
}
311
312
594k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
594k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
594k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
594k
    return Status::OK();
317
594k
}
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
303k
                                     Block* output_block) const {
326
303k
    auto* local_state = state->get_local_state(operator_id());
327
303k
    SCOPED_TIMER(local_state->exec_time_counter());
328
303k
    SCOPED_TIMER(local_state->_projection_timer);
329
303k
    const size_t rows = origin_block->rows();
330
303k
    if (rows == 0) {
331
158k
        return Status::OK();
332
158k
    }
333
145k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
145k
    {
336
145k
        Block input_block = *origin_block;
337
338
145k
        ColumnsWithTypeAndName new_columns;
339
145k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.49k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.49k
            new_columns.resize(projections.size());
345
68.8k
            for (int i = 0; i < projections.size(); i++) {
346
65.4k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
65.3k
                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
65.3k
            }
355
3.48k
            Block tmp_block {new_columns};
356
3.48k
            input_block.swap(tmp_block);
357
3.48k
        }
358
359
145k
        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
145k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
145k
                output_block, _projection->output_row_descriptor);
368
145k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
145k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
145k
        Columns shared_columns(mutable_columns.size());
371
372
832k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
687k
            ColumnPtr column_ptr;
374
687k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
687k
            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
687k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
687k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
687k
            if (column_ptr->is_exclusive()) {
386
241k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
445k
            } else {
388
445k
                shared_columns[i] = std::move(column_ptr);
389
445k
            }
390
687k
        }
391
392
145k
        scoped_mutable_block.restore();
393
832k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
687k
            if (shared_columns[i]) {
395
446k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
446k
            }
397
687k
        }
398
145k
    }
399
400
0
    origin_block->clear_column_data(
401
145k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
145k
    DCHECK_EQ(output_block->rows(), rows);
403
404
145k
    return Status::OK();
405
145k
}
406
407
3.94M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
3.94M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
3.94M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
3.94M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
3.94M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
3.94M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
3.94M
            if (_debug_point_count++ % 2 == 0) {
414
3.94M
                return Status::OK();
415
3.94M
            }
416
3.94M
        }
417
3.94M
    });
418
419
3.94M
    Status status;
420
3.94M
    auto* local_state = state->get_local_state(operator_id());
421
3.94M
    Defer defer([&]() {
422
3.95M
        if (status.ok()) {
423
3.95M
            local_state->update_output_block_counters(*block);
424
3.95M
        }
425
3.94M
    });
426
3.94M
    if (has_projection()) {
427
303k
        local_state->clear_origin_block();
428
303k
        status = get_block(state, &local_state->_origin_block, eos);
429
303k
        if (UNLIKELY(!status.ok())) {
430
24
            return status;
431
24
        }
432
303k
        status = do_projections(state, &local_state->_origin_block, block);
433
303k
        return status;
434
303k
    }
435
3.64M
    status = get_block(state, block, eos);
436
3.64M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.64M
    return status;
438
3.64M
}
439
440
2.55M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.55M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.52k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.52k
        *eos = true;
444
9.52k
    }
445
446
2.55M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.55M
        auto op_name = to_lower(_parent->_op_name);
448
2.55M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.55M
        arg_op_name = to_lower(arg_op_name);
450
451
2.55M
        if (op_name == arg_op_name) {
452
2.55M
            *eos = true;
453
2.55M
        }
454
2.55M
    });
455
456
2.55M
    if (auto rows = block->rows()) {
457
762k
        _num_rows_returned += rows;
458
762k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
762k
    }
460
2.55M
}
461
462
32.2k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
32.2k
    auto result = state->get_sink_local_state_result();
464
32.2k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
32.2k
    return result.value()->terminate(state);
468
32.2k
}
469
470
15.8k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.8k
    fmt::memory_buffer debug_string_buffer;
472
473
15.8k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.8k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.8k
    return fmt::to_string(debug_string_buffer);
476
15.8k
}
477
478
15.8k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.8k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.8k
}
481
482
342k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
342k
    std::string op_name = "UNKNOWN_SINK";
484
342k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
343k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
343k
        op_name = it->second;
488
343k
    }
489
342k
    _name = op_name + "_OPERATOR";
490
342k
    return Status::OK();
491
342k
}
492
493
289k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
289k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
289k
    _nereids_id = tnode.nereids_id;
496
289k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
289k
    _name = substr + "_SINK_OPERATOR";
498
289k
    return Status::OK();
499
289k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.60M
                                                            LocalSinkStateInfo& info) {
504
1.60M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.60M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.60M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.60M
    return Status::OK();
508
1.60M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
121k
                                                            LocalSinkStateInfo& info) {
504
121k
    auto local_state = LocalStateType::create_unique(this, state);
505
121k
    RETURN_IF_ERROR(local_state->init(state, info));
506
121k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
121k
    return Status::OK();
508
121k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
336k
                                                            LocalSinkStateInfo& info) {
504
336k
    auto local_state = LocalStateType::create_unique(this, state);
505
336k
    RETURN_IF_ERROR(local_state->init(state, info));
506
336k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
336k
    return Status::OK();
508
336k
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
3
                                                            LocalSinkStateInfo& info) {
504
3
    auto local_state = LocalStateType::create_unique(this, state);
505
3
    RETURN_IF_ERROR(local_state->init(state, info));
506
3
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
3
    return Status::OK();
508
3
}
_ZN5doris17DataSinkOperatorXINS_24ResultFileSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
350
                                                            LocalSinkStateInfo& info) {
504
350
    auto local_state = LocalStateType::create_unique(this, state);
505
350
    RETURN_IF_ERROR(local_state->init(state, info));
506
350
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
350
    return Status::OK();
508
350
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.0k
                                                            LocalSinkStateInfo& info) {
504
47.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.0k
    return Status::OK();
508
47.0k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
332
                                                            LocalSinkStateInfo& info) {
504
332
    auto local_state = LocalStateType::create_unique(this, state);
505
332
    RETURN_IF_ERROR(local_state->init(state, info));
506
332
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
332
    return Status::OK();
508
332
}
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE17setup_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.23k
                                                            LocalSinkStateInfo& info) {
504
9.23k
    auto local_state = LocalStateType::create_unique(this, state);
505
9.23k
    RETURN_IF_ERROR(local_state->init(state, info));
506
9.23k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
9.23k
    return Status::OK();
508
9.23k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
38
                                                            LocalSinkStateInfo& info) {
504
38
    auto local_state = LocalStateType::create_unique(this, state);
505
38
    RETURN_IF_ERROR(local_state->init(state, info));
506
38
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
38
    return Status::OK();
508
38
}
_ZN5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
196k
                                                            LocalSinkStateInfo& info) {
504
196k
    auto local_state = LocalStateType::create_unique(this, state);
505
196k
    RETURN_IF_ERROR(local_state->init(state, info));
506
196k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
196k
    return Status::OK();
508
196k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
35
                                                            LocalSinkStateInfo& info) {
504
35
    auto local_state = LocalStateType::create_unique(this, state);
505
35
    RETURN_IF_ERROR(local_state->init(state, info));
506
35
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
35
    return Status::OK();
508
35
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_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_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
92.0k
                                                            LocalSinkStateInfo& info) {
504
92.0k
    auto local_state = LocalStateType::create_unique(this, state);
505
92.0k
    RETURN_IF_ERROR(local_state->init(state, info));
506
92.0k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
92.0k
    return Status::OK();
508
92.0k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.8k
                                                            LocalSinkStateInfo& info) {
504
47.8k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.8k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.8k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.8k
    return Status::OK();
508
47.8k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
240
                                                            LocalSinkStateInfo& info) {
504
240
    auto local_state = LocalStateType::create_unique(this, state);
505
240
    RETURN_IF_ERROR(local_state->init(state, info));
506
240
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
240
    return Status::OK();
508
240
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
477k
                                                            LocalSinkStateInfo& info) {
504
477k
    auto local_state = LocalStateType::create_unique(this, state);
505
477k
    RETURN_IF_ERROR(local_state->init(state, info));
506
477k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
477k
    return Status::OK();
508
477k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
6.50k
                                                            LocalSinkStateInfo& info) {
504
6.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
6.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
6.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
6.50k
    return Status::OK();
508
6.50k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
8.79k
                                                            LocalSinkStateInfo& info) {
504
8.79k
    auto local_state = LocalStateType::create_unique(this, state);
505
8.79k
    RETURN_IF_ERROR(local_state->init(state, info));
506
8.79k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
8.79k
    return Status::OK();
508
8.79k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.22k
                                                            LocalSinkStateInfo& info) {
504
2.22k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.22k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.22k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.22k
    return Status::OK();
508
2.22k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
631
                                                            LocalSinkStateInfo& info) {
504
631
    auto local_state = LocalStateType::create_unique(this, state);
505
631
    RETURN_IF_ERROR(local_state->init(state, info));
506
631
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
631
    return Status::OK();
508
631
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
4.72k
                                                            LocalSinkStateInfo& info) {
504
4.72k
    auto local_state = LocalStateType::create_unique(this, state);
505
4.72k
    RETURN_IF_ERROR(local_state->init(state, info));
506
4.72k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
4.72k
    return Status::OK();
508
4.72k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.49k
                                                            LocalSinkStateInfo& info) {
504
2.49k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.49k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.49k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.49k
    return Status::OK();
508
2.49k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.57k
                                                            LocalSinkStateInfo& info) {
504
2.57k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.57k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.57k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.57k
    return Status::OK();
508
2.57k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.45k
                                                            LocalSinkStateInfo& info) {
504
2.45k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.45k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.45k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.45k
    return Status::OK();
508
2.45k
}
_ZN5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
1
                                                            LocalSinkStateInfo& info) {
504
1
    auto local_state = LocalStateType::create_unique(this, state);
505
1
    RETURN_IF_ERROR(local_state->init(state, info));
506
1
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1
    return Status::OK();
508
1
}
_ZN5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
567
                                                            LocalSinkStateInfo& info) {
504
567
    auto local_state = LocalStateType::create_unique(this, state);
505
567
    RETURN_IF_ERROR(local_state->init(state, info));
506
567
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
567
    return Status::OK();
508
567
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
107
                                                            LocalSinkStateInfo& info) {
504
107
    auto local_state = LocalStateType::create_unique(this, state);
505
107
    RETURN_IF_ERROR(local_state->init(state, info));
506
107
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
107
    return Status::OK();
508
107
}
_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.28M
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.28M
    } else {
519
1.28M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.28M
        ss->id = operator_id();
521
1.28M
        for (auto& dest : dests_id()) {
522
1.27M
            ss->related_op_ids.insert(dest);
523
1.27M
        }
524
1.28M
        return ss;
525
1.28M
    }
526
1.28M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
104k
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
104k
    } else {
519
104k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
104k
        ss->id = operator_id();
521
104k
        for (auto& dest : dests_id()) {
522
104k
            ss->related_op_ids.insert(dest);
523
104k
        }
524
104k
        return ss;
525
104k
    }
526
104k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
336k
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
336k
    } else {
519
336k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
336k
        ss->id = operator_id();
521
336k
        for (auto& dest : dests_id()) {
522
334k
            ss->related_op_ids.insert(dest);
523
334k
        }
524
336k
        return ss;
525
336k
    }
526
336k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23JdbcTableSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27MemoryScratchSinkLocalStateEE19create_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_24ResultFileSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
349
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
349
    } else {
519
349
        auto ss = LocalStateType::SharedStateType::create_shared();
520
349
        ss->id = operator_id();
521
350
        for (auto& dest : dests_id()) {
522
350
            ss->related_op_ids.insert(dest);
523
350
        }
524
349
        return ss;
525
349
    }
526
349
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
47.1k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
47.1k
    } else {
519
47.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
47.1k
        ss->id = operator_id();
521
47.1k
        for (auto& dest : dests_id()) {
522
46.6k
            ss->related_op_ids.insert(dest);
523
46.6k
        }
524
47.1k
        return ss;
525
47.1k
    }
526
47.1k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
332
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
332
    } else {
519
332
        auto ss = LocalStateType::SharedStateType::create_shared();
520
332
        ss->id = operator_id();
521
332
        for (auto& dest : dests_id()) {
522
332
            ss->related_op_ids.insert(dest);
523
332
        }
524
332
        return ss;
525
332
    }
526
332
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_23HiveTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22TVFTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26IcebergTableSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_31SpillIcebergTableSinkLocalStateEE19create_shared_stateEv
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.32k
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.32k
    } else {
519
9.32k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
9.32k
        ss->id = operator_id();
521
9.33k
        for (auto& dest : dests_id()) {
522
9.33k
            ss->related_op_ids.insert(dest);
523
9.33k
        }
524
9.32k
        return ss;
525
9.32k
    }
526
9.32k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
43
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
43
    } else {
519
43
        auto ss = LocalStateType::SharedStateType::create_shared();
520
43
        ss->id = operator_id();
521
43
        for (auto& dest : dests_id()) {
522
39
            ss->related_op_ids.insert(dest);
523
39
        }
524
43
        return ss;
525
43
    }
526
43
}
_ZNK5doris17DataSinkOperatorXINS_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
197k
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
197k
    } else {
519
197k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
197k
        ss->id = operator_id();
521
197k
        for (auto& dest : dests_id()) {
522
197k
            ss->related_op_ids.insert(dest);
523
197k
        }
524
197k
        return ss;
525
197k
    }
526
197k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
37
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
37
    } else {
519
37
        auto ss = LocalStateType::SharedStateType::create_shared();
520
37
        ss->id = operator_id();
521
37
        for (auto& dest : dests_id()) {
522
37
            ss->related_op_ids.insert(dest);
523
37
        }
524
37
        return ss;
525
37
    }
526
37
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
92.4k
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
92.4k
    } else {
519
92.4k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
92.4k
        ss->id = operator_id();
521
92.4k
        for (auto& dest : dests_id()) {
522
92.4k
            ss->related_op_ids.insert(dest);
523
92.4k
        }
524
92.4k
        return ss;
525
92.4k
    }
526
92.4k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
239
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
239
    } else {
519
239
        auto ss = LocalStateType::SharedStateType::create_shared();
520
239
        ss->id = operator_id();
521
239
        for (auto& dest : dests_id()) {
522
239
            ss->related_op_ids.insert(dest);
523
239
        }
524
239
        return ss;
525
239
    }
526
239
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
478k
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
478k
    } else {
519
478k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
478k
        ss->id = operator_id();
521
478k
        for (auto& dest : dests_id()) {
522
473k
            ss->related_op_ids.insert(dest);
523
473k
        }
524
478k
        return ss;
525
478k
    }
526
478k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
6.53k
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.53k
    } else {
519
6.53k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
6.53k
        ss->id = operator_id();
521
6.54k
        for (auto& dest : dests_id()) {
522
6.54k
            ss->related_op_ids.insert(dest);
523
6.54k
        }
524
6.53k
        return ss;
525
6.53k
    }
526
6.53k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
731
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
731
    } else {
519
731
        auto ss = LocalStateType::SharedStateType::create_shared();
520
731
        ss->id = operator_id();
521
731
        for (auto& dest : dests_id()) {
522
729
            ss->related_op_ids.insert(dest);
523
729
        }
524
731
        return ss;
525
731
    }
526
731
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.56k
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.56k
    } else {
519
2.56k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.56k
        ss->id = operator_id();
521
2.56k
        for (auto& dest : dests_id()) {
522
2.56k
            ss->related_op_ids.insert(dest);
523
2.56k
        }
524
2.56k
        return ss;
525
2.56k
    }
526
2.56k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.45k
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.45k
    } else {
519
2.45k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.45k
        ss->id = operator_id();
521
2.45k
        for (auto& dest : dests_id()) {
522
2.43k
            ss->related_op_ids.insert(dest);
523
2.43k
        }
524
2.45k
        return ss;
525
2.45k
    }
526
2.45k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
568
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
568
    } else {
519
568
        auto ss = LocalStateType::SharedStateType::create_shared();
520
568
        ss->id = operator_id();
521
568
        for (auto& dest : dests_id()) {
522
560
            ss->related_op_ids.insert(dest);
523
560
        }
524
568
        return ss;
525
568
    }
526
568
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
107
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
107
    } else {
519
107
        auto ss = LocalStateType::SharedStateType::create_shared();
520
107
        ss->id = operator_id();
521
107
        for (auto& dest : dests_id()) {
522
107
            ss->related_op_ids.insert(dest);
523
107
        }
524
107
        return ss;
525
107
    }
526
107
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.90M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.90M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.90M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.90M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.90M
    return Status::OK();
534
1.90M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
73.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
73.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
73.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
73.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
73.1k
    return Status::OK();
534
73.1k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
244k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
244k
    auto local_state = LocalStateType::create_unique(state, this);
531
244k
    RETURN_IF_ERROR(local_state->init(state, info));
532
244k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
244k
    return Status::OK();
534
244k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
134
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
134
    auto local_state = LocalStateType::create_unique(state, this);
531
134
    RETURN_IF_ERROR(local_state->init(state, info));
532
134
    state->emplace_local_state(operator_id(), std::move(local_state));
533
134
    return Status::OK();
534
134
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.11k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.11k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.11k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.11k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.11k
    return Status::OK();
534
3.11k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.25k
    return Status::OK();
534
9.25k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.07k
    return Status::OK();
534
9.07k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
28
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
28
    auto local_state = LocalStateType::create_unique(state, this);
531
28
    RETURN_IF_ERROR(local_state->init(state, info));
532
28
    state->emplace_local_state(operator_id(), std::move(local_state));
533
28
    return Status::OK();
534
28
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
187k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
187k
    auto local_state = LocalStateType::create_unique(state, this);
531
187k
    RETURN_IF_ERROR(local_state->init(state, info));
532
187k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
187k
    return Status::OK();
534
187k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
92.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
92.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
92.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
92.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
92.0k
    return Status::OK();
534
92.0k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
48.0k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
48.0k
    auto local_state = LocalStateType::create_unique(state, this);
531
48.0k
    RETURN_IF_ERROR(local_state->init(state, info));
532
48.0k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
48.0k
    return Status::OK();
534
48.0k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
230
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
230
    auto local_state = LocalStateType::create_unique(state, this);
531
230
    RETURN_IF_ERROR(local_state->init(state, info));
532
230
    state->emplace_local_state(operator_id(), std::move(local_state));
533
230
    return Status::OK();
534
230
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.49k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.49k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.49k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.49k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.49k
    return Status::OK();
534
3.49k
}
_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.20k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.20k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.20k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.20k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.20k
    return Status::OK();
534
1.20k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.47k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.47k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.47k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.47k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.47k
    return Status::OK();
534
6.47k
}
_ZN5doris9OperatorXINS_23AssertNumRowsLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
27
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
27
    auto local_state = LocalStateType::create_unique(state, this);
531
27
    RETURN_IF_ERROR(local_state->init(state, info));
532
27
    state->emplace_local_state(operator_id(), std::move(local_state));
533
27
    return Status::OK();
534
27
}
_ZN5doris9OperatorXINS_18EmptySetLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
54.5k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.5k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.5k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.5k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.5k
    return Status::OK();
534
54.5k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.02k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.02k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.02k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.02k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.02k
    return Status::OK();
534
6.02k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
624
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
624
    auto local_state = LocalStateType::create_unique(state, this);
531
624
    RETURN_IF_ERROR(local_state->init(state, info));
532
624
    state->emplace_local_state(operator_id(), std::move(local_state));
533
624
    return Status::OK();
534
624
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.56k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.56k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.56k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.56k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.56k
    return Status::OK();
534
2.56k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.43k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.43k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.43k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.43k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.43k
    return Status::OK();
534
2.43k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
326
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
326
    auto local_state = LocalStateType::create_unique(state, this);
531
326
    RETURN_IF_ERROR(local_state->init(state, info));
532
326
    state->emplace_local_state(operator_id(), std::move(local_state));
533
326
    return Status::OK();
534
326
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.60k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.60k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.60k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.60k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.60k
    return Status::OK();
534
1.60k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.3k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.3k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.3k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.3k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.3k
    return Status::OK();
534
10.3k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
601k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
601k
    auto local_state = LocalStateType::create_unique(state, this);
531
601k
    RETURN_IF_ERROR(local_state->init(state, info));
532
601k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
601k
    return Status::OK();
534
601k
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_34PartitionedHashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_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
781
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
781
    auto local_state = LocalStateType::create_unique(state, this);
531
781
    RETURN_IF_ERROR(local_state->init(state, info));
532
781
    state->emplace_local_state(operator_id(), std::move(local_state));
533
781
    return Status::OK();
534
781
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.30k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.30k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.30k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.30k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.30k
    return Status::OK();
534
1.30k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
8.68k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
8.68k
    auto local_state = LocalStateType::create_unique(state, this);
531
8.68k
    RETURN_IF_ERROR(local_state->init(state, info));
532
8.68k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
8.68k
    return Status::OK();
534
8.68k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
273k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
273k
    auto local_state = LocalStateType::create_unique(state, this);
531
273k
    RETURN_IF_ERROR(local_state->init(state, info));
532
273k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
273k
    return Status::OK();
534
273k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.60M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.89M
        : _num_rows_returned(0),
542
1.89M
          _rows_returned_counter(nullptr),
543
1.89M
          _parent(parent),
544
1.89M
          _state(state),
545
1.89M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.90M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.90M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.90M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.90M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.90M
    _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.90M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.90M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.90M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.90M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.90M
    if constexpr (!is_fake_shared) {
560
1.09M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
656k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
656k
                                    .first.get()
563
656k
                                    ->template cast<SharedStateArg>();
564
565
656k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
656k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
656k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
656k
        } else if (info.shared_state) {
569
366k
            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
366k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
366k
            _dependency = _shared_state->create_source_dependency(
576
366k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
366k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
366k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
366k
        } else {
580
74.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
11.0k
                DCHECK(false);
582
11.0k
            }
583
74.0k
        }
584
1.09M
    }
585
586
1.90M
    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.90M
    _rows_returned_counter =
591
1.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.90M
    _blocks_returned_counter =
593
1.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.90M
    _output_block_bytes_counter =
595
1.90M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.90M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.90M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.90M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.90M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.90M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.90M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.90M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.90M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.90M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.90M
    _memory_used_counter =
606
1.90M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.90M
    _common_profile->add_info_string("IsColocate",
608
1.90M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.90M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.90M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.90M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.90M
    return Status::OK();
613
1.90M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
73.3k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
73.3k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
73.3k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
73.3k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
73.3k
    _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
73.3k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
73.3k
    _operator_profile->add_child(_common_profile.get(), true);
557
73.3k
    _operator_profile->add_child(_custom_profile.get(), true);
558
73.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
73.3k
    if constexpr (!is_fake_shared) {
560
73.3k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
16.1k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
16.1k
                                    .first.get()
563
16.1k
                                    ->template cast<SharedStateArg>();
564
565
16.1k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
16.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
16.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
57.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
56.2k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
56.2k
            _dependency = _shared_state->create_source_dependency(
576
56.2k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
56.2k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
56.2k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
56.2k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
947
        }
584
73.3k
    }
585
586
73.3k
    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
73.3k
    _rows_returned_counter =
591
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
73.3k
    _blocks_returned_counter =
593
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
73.3k
    _output_block_bytes_counter =
595
73.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
73.3k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
73.3k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
73.3k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
73.3k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
73.3k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
73.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
73.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
73.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
73.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
73.3k
    _memory_used_counter =
606
73.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
73.3k
    _common_profile->add_info_string("IsColocate",
608
73.3k
                                     std::to_string(_parent->is_colocated_operator()));
609
73.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
73.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
73.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
73.3k
    return Status::OK();
613
73.3k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
1
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1
    _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
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1
    _operator_profile->add_child(_common_profile.get(), true);
557
1
    _operator_profile->add_child(_custom_profile.get(), true);
558
1
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1
    if constexpr (!is_fake_shared) {
560
1
        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
1
        } 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
1
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
1
            _dependency = _shared_state->create_source_dependency(
576
1
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
1
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
1
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
1
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
1
    }
585
586
1
    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
    _rows_returned_counter =
591
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1
    _blocks_returned_counter =
593
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1
    _output_block_bytes_counter =
595
1
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1
    _memory_used_counter =
606
1
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1
    _common_profile->add_info_string("IsColocate",
608
1
                                     std::to_string(_parent->is_colocated_operator()));
609
1
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1
    return Status::OK();
613
1
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
196k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
196k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
196k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
196k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
196k
    _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
196k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
196k
    _operator_profile->add_child(_common_profile.get(), true);
557
196k
    _operator_profile->add_child(_custom_profile.get(), true);
558
196k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
196k
    if constexpr (!is_fake_shared) {
560
196k
        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
196k
        } 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
187k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
187k
            _dependency = _shared_state->create_source_dependency(
576
187k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
187k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
187k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
187k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.93k
        }
584
196k
    }
585
586
196k
    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
196k
    _rows_returned_counter =
591
196k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
196k
    _blocks_returned_counter =
593
196k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
196k
    _output_block_bytes_counter =
595
196k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
196k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
196k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
196k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
196k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
196k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
196k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
196k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
196k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
196k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
196k
    _memory_used_counter =
606
196k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
196k
    _common_profile->add_info_string("IsColocate",
608
196k
                                     std::to_string(_parent->is_colocated_operator()));
609
196k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
196k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
196k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
196k
    return Status::OK();
613
196k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
28
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
28
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
28
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
28
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
28
    _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
28
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
28
    _operator_profile->add_child(_common_profile.get(), true);
557
28
    _operator_profile->add_child(_custom_profile.get(), true);
558
28
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
28
    if constexpr (!is_fake_shared) {
560
28
        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
28
        } 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
28
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
28
            _dependency = _shared_state->create_source_dependency(
576
28
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
28
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
28
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
28
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
28
    }
585
586
28
    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
28
    _rows_returned_counter =
591
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
28
    _blocks_returned_counter =
593
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
28
    _output_block_bytes_counter =
595
28
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
28
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
28
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
28
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
28
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
28
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
28
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
28
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
28
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
28
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
28
    _memory_used_counter =
606
28
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
28
    _common_profile->add_info_string("IsColocate",
608
28
                                     std::to_string(_parent->is_colocated_operator()));
609
28
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
28
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
28
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
28
    return Status::OK();
613
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
6.50k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.50k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.50k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.50k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.50k
    _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
6.50k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.50k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.50k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.50k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.50k
    if constexpr (!is_fake_shared) {
560
6.50k
        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
6.50k
        } 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
6.38k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.38k
            _dependency = _shared_state->create_source_dependency(
576
6.38k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.38k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.38k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.38k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
125
        }
584
6.50k
    }
585
586
6.50k
    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
6.50k
    _rows_returned_counter =
591
6.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.50k
    _blocks_returned_counter =
593
6.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.50k
    _output_block_bytes_counter =
595
6.50k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.50k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.50k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.50k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.50k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.50k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.50k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.50k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.50k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.50k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.50k
    _memory_used_counter =
606
6.50k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.50k
    _common_profile->add_info_string("IsColocate",
608
6.50k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.50k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.50k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.50k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.50k
    return Status::OK();
613
6.50k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
9.35k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
9.35k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
9.35k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
9.35k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
9.35k
    _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.35k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
9.35k
    _operator_profile->add_child(_common_profile.get(), true);
557
9.35k
    _operator_profile->add_child(_custom_profile.get(), true);
558
9.35k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
9.35k
    if constexpr (!is_fake_shared) {
560
9.35k
        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.35k
        } 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.19k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
9.19k
            _dependency = _shared_state->create_source_dependency(
576
9.19k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
9.19k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
9.19k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
9.19k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
157
        }
584
9.35k
    }
585
586
9.35k
    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.35k
    _rows_returned_counter =
591
9.35k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
9.35k
    _blocks_returned_counter =
593
9.35k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
9.35k
    _output_block_bytes_counter =
595
9.35k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
9.35k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
9.35k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
9.35k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
9.35k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
9.35k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
9.35k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
9.35k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
9.35k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
9.35k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
9.35k
    _memory_used_counter =
606
9.35k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
9.35k
    _common_profile->add_info_string("IsColocate",
608
9.35k
                                     std::to_string(_parent->is_colocated_operator()));
609
9.35k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
9.35k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
9.35k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
9.35k
    return Status::OK();
613
9.35k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
92.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
92.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
92.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
92.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
92.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
92.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
92.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
92.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
92.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
92.4k
    if constexpr (!is_fake_shared) {
560
92.4k
        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
92.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
90.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
90.6k
            _dependency = _shared_state->create_source_dependency(
576
90.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
90.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
90.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
90.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.76k
        }
584
92.4k
    }
585
586
92.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
92.4k
    _rows_returned_counter =
591
92.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
92.4k
    _blocks_returned_counter =
593
92.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
92.4k
    _output_block_bytes_counter =
595
92.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
92.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
92.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
92.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
92.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
92.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
92.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
92.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
92.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
92.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
92.4k
    _memory_used_counter =
606
92.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
92.4k
    _common_profile->add_info_string("IsColocate",
608
92.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
92.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
92.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
92.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
92.4k
    return Status::OK();
613
92.4k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
48.0k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
48.0k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
48.0k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
48.0k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
48.0k
    _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
48.0k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
48.0k
    _operator_profile->add_child(_common_profile.get(), true);
557
48.0k
    _operator_profile->add_child(_custom_profile.get(), true);
558
48.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
48.0k
    if constexpr (!is_fake_shared) {
560
48.0k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
47.9k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
47.9k
                                    .first.get()
563
47.9k
                                    ->template cast<SharedStateArg>();
564
565
47.9k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
47.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
47.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
47.9k
        } 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
107
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
107
        }
584
48.0k
    }
585
586
48.0k
    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
48.0k
    _rows_returned_counter =
591
48.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
48.0k
    _blocks_returned_counter =
593
48.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
48.0k
    _output_block_bytes_counter =
595
48.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
48.0k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
48.0k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
48.0k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
48.0k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
48.0k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
48.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
48.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
48.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
48.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
48.0k
    _memory_used_counter =
606
48.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
48.0k
    _common_profile->add_info_string("IsColocate",
608
48.0k
                                     std::to_string(_parent->is_colocated_operator()));
609
48.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
48.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
48.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
48.0k
    return Status::OK();
613
48.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
229
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
229
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
229
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
229
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
229
    _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
229
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
229
    _operator_profile->add_child(_common_profile.get(), true);
557
229
    _operator_profile->add_child(_custom_profile.get(), true);
558
229
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
229
    if constexpr (!is_fake_shared) {
560
229
        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
229
        } 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
229
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
229
            _dependency = _shared_state->create_source_dependency(
576
229
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
229
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
229
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
229
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
229
    }
585
586
229
    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
229
    _rows_returned_counter =
591
229
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
229
    _blocks_returned_counter =
593
229
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
229
    _output_block_bytes_counter =
595
229
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
229
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
229
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
229
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
229
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
229
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
229
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
229
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
229
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
229
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
229
    _memory_used_counter =
606
229
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
229
    _common_profile->add_info_string("IsColocate",
608
229
                                     std::to_string(_parent->is_colocated_operator()));
609
229
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
229
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
229
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
229
    return Status::OK();
613
229
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
812k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
812k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
812k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
812k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
812k
    _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
812k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
812k
    _operator_profile->add_child(_common_profile.get(), true);
557
812k
    _operator_profile->add_child(_custom_profile.get(), true);
558
812k
    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
812k
    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
812k
    _rows_returned_counter =
591
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
812k
    _blocks_returned_counter =
593
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
812k
    _output_block_bytes_counter =
595
812k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
812k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
812k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
812k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
812k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
812k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
812k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
812k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
812k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
812k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
812k
    _memory_used_counter =
606
812k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
812k
    _common_profile->add_info_string("IsColocate",
608
812k
                                     std::to_string(_parent->is_colocated_operator()));
609
812k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
812k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
812k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
812k
    return Status::OK();
613
812k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.4k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.4k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.4k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.4k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.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
54.4k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.4k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.4k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.4k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.4k
    if constexpr (!is_fake_shared) {
560
54.4k
        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
54.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
3.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.85k
            _dependency = _shared_state->create_source_dependency(
576
3.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
50.5k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50.5k
        }
584
54.4k
    }
585
586
54.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
54.4k
    _rows_returned_counter =
591
54.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.4k
    _blocks_returned_counter =
593
54.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.4k
    _output_block_bytes_counter =
595
54.4k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.4k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.4k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.4k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.4k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.4k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.4k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.4k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.4k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.4k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.4k
    _memory_used_counter =
606
54.4k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.4k
    _common_profile->add_info_string("IsColocate",
608
54.4k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.4k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.4k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.4k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.4k
    return Status::OK();
613
54.4k
}
_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
6.04k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.04k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.04k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.04k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.04k
    _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
6.04k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.04k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.04k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.04k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.04k
    if constexpr (!is_fake_shared) {
560
6.04k
        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
6.04k
        } 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.99k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.99k
            _dependency = _shared_state->create_source_dependency(
576
5.99k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.99k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.99k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.99k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
52
        }
584
6.04k
    }
585
586
6.04k
    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
6.04k
    _rows_returned_counter =
591
6.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.04k
    _blocks_returned_counter =
593
6.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.04k
    _output_block_bytes_counter =
595
6.04k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.04k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.04k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.04k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.04k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.04k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.04k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.04k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.04k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.04k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.04k
    _memory_used_counter =
606
6.04k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.04k
    _common_profile->add_info_string("IsColocate",
608
6.04k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.04k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.04k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.04k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.04k
    return Status::OK();
613
6.04k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
729
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
729
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
729
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
729
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
729
    _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
729
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
729
    _operator_profile->add_child(_common_profile.get(), true);
557
729
    _operator_profile->add_child(_custom_profile.get(), true);
558
729
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
729
    if constexpr (!is_fake_shared) {
560
729
        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
729
        } 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
703
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
703
            _dependency = _shared_state->create_source_dependency(
576
703
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
703
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
703
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
703
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
26
        }
584
729
    }
585
586
729
    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
729
    _rows_returned_counter =
591
729
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
729
    _blocks_returned_counter =
593
729
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
729
    _output_block_bytes_counter =
595
729
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
729
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
729
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
729
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
729
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
729
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
729
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
729
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
729
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
729
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
729
    _memory_used_counter =
606
729
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
729
    _common_profile->add_info_string("IsColocate",
608
729
                                     std::to_string(_parent->is_colocated_operator()));
609
729
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
729
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
729
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
729
    return Status::OK();
613
729
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.06k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.06k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.06k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.06k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.06k
    _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.06k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.06k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.06k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.06k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.06k
    if constexpr (!is_fake_shared) {
560
5.06k
        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.06k
        } 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.74k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
4.74k
            _dependency = _shared_state->create_source_dependency(
576
4.74k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
4.74k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
4.74k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
4.74k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
315
        }
584
5.06k
    }
585
586
5.06k
    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.06k
    _rows_returned_counter =
591
5.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.06k
    _blocks_returned_counter =
593
5.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.06k
    _output_block_bytes_counter =
595
5.06k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.06k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.06k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.06k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.06k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.06k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.06k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.06k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.06k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.06k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.06k
    _memory_used_counter =
606
5.06k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.06k
    _common_profile->add_info_string("IsColocate",
608
5.06k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.06k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.06k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.06k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.06k
    return Status::OK();
613
5.06k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
603k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
603k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
603k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
603k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
603k
    _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
603k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
603k
    _operator_profile->add_child(_common_profile.get(), true);
557
603k
    _operator_profile->add_child(_custom_profile.get(), true);
558
603k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
603k
    if constexpr (!is_fake_shared) {
560
603k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
592k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
592k
                                    .first.get()
563
592k
                                    ->template cast<SharedStateArg>();
564
565
592k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
592k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
592k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
592k
        } 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
11.0k
        } else {
580
11.0k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
11.0k
                DCHECK(false);
582
11.0k
            }
583
11.0k
        }
584
603k
    }
585
586
603k
    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
603k
    _rows_returned_counter =
591
603k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
603k
    _blocks_returned_counter =
593
603k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
603k
    _output_block_bytes_counter =
595
603k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
603k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
603k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
603k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
603k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
603k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
603k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
603k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
603k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
603k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
603k
    _memory_used_counter =
606
603k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
603k
    _common_profile->add_info_string("IsColocate",
608
603k
                                     std::to_string(_parent->is_colocated_operator()));
609
603k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
603k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
603k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
603k
    return Status::OK();
613
603k
}
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.92M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.92M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.22M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
304k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
304k
    }
621
1.92M
    if (_parent->has_projection()) {
622
386k
        const auto& projection = *_parent->_projection;
623
386k
        _projections.resize(projection.projections.size());
624
2.38M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.99M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.99M
        }
627
386k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
401k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
15.3k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
212k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
197k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
197k
                        state, _intermediate_projections[i][j]));
633
197k
            }
634
15.3k
        }
635
386k
    }
636
1.92M
    return Status::OK();
637
1.92M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
73.4k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
73.4k
    _conjuncts.resize(_parent->_conjuncts.size());
618
74.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.43k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.43k
    }
621
73.5k
    if (_parent->has_projection()) {
622
73.5k
        const auto& projection = *_parent->_projection;
623
73.5k
        _projections.resize(projection.projections.size());
624
390k
        for (size_t i = 0; i < _projections.size(); i++) {
625
317k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
317k
        }
627
73.5k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80.3k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
6.84k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
157k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
150k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
150k
                        state, _intermediate_projections[i][j]));
633
150k
            }
634
6.84k
        }
635
73.5k
    }
636
73.4k
    return Status::OK();
637
73.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
3
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
3
    _conjuncts.resize(_parent->_conjuncts.size());
618
3
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
3
    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
3
    return Status::OK();
637
3
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
198k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
198k
    _conjuncts.resize(_parent->_conjuncts.size());
618
198k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
198k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
405
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
80
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
80
        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
80
    }
636
198k
    return Status::OK();
637
198k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
28
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
28
    _conjuncts.resize(_parent->_conjuncts.size());
618
28
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
28
    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
28
    return Status::OK();
637
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
6.55k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.55k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.61k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
66
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
66
    }
621
6.55k
    if (_parent->has_projection()) {
622
6.55k
        const auto& projection = *_parent->_projection;
623
6.55k
        _projections.resize(projection.projections.size());
624
30.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
24.2k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
24.2k
        }
627
6.55k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
6.57k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
24
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
155
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
131
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
131
                        state, _intermediate_projections[i][j]));
633
131
            }
634
24
        }
635
6.55k
    }
636
6.55k
    return Status::OK();
637
6.55k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
9.37k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
9.37k
    _conjuncts.resize(_parent->_conjuncts.size());
618
10.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.20k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.20k
    }
621
9.37k
    if (_parent->has_projection()) {
622
5.48k
        const auto& projection = *_parent->_projection;
623
5.48k
        _projections.resize(projection.projections.size());
624
22.1k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.6k
        }
627
5.48k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.57k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
87
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
643
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
556
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
556
                        state, _intermediate_projections[i][j]));
633
556
            }
634
87
        }
635
5.48k
    }
636
9.37k
    return Status::OK();
637
9.37k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
92.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
92.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
94.3k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.71k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.71k
    }
621
92.6k
    if (_parent->has_projection()) {
622
31.4k
        const auto& projection = *_parent->_projection;
623
31.4k
        _projections.resize(projection.projections.size());
624
282k
        for (size_t i = 0; i < _projections.size(); i++) {
625
251k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
251k
        }
627
31.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
31.6k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
212
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.40k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.19k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.19k
                        state, _intermediate_projections[i][j]));
633
1.19k
            }
634
212
        }
635
31.4k
    }
636
92.6k
    return Status::OK();
637
92.6k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
48.0k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
48.0k
    _conjuncts.resize(_parent->_conjuncts.size());
618
48.0k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
23
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
23
    }
621
48.0k
    if (_parent->has_projection()) {
622
213
        const auto& projection = *_parent->_projection;
623
213
        _projections.resize(projection.projections.size());
624
930
        for (size_t i = 0; i < _projections.size(); i++) {
625
717
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
717
        }
627
213
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
213
        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
213
    }
636
48.0k
    return Status::OK();
637
48.0k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
234
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
234
    _conjuncts.resize(_parent->_conjuncts.size());
618
234
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
234
    if (_parent->has_projection()) {
622
206
        const auto& projection = *_parent->_projection;
623
206
        _projections.resize(projection.projections.size());
624
618
        for (size_t i = 0; i < _projections.size(); i++) {
625
412
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
412
        }
627
206
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
206
        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
206
    }
636
234
    return Status::OK();
637
234
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
817k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
817k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.11M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
299k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
299k
    }
621
817k
    if (_parent->has_projection()) {
622
257k
        const auto& projection = *_parent->_projection;
623
257k
        _projections.resize(projection.projections.size());
624
1.54M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.28M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.28M
        }
627
257k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
265k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
8.04k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
49.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
41.1k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
41.1k
                        state, _intermediate_projections[i][j]));
633
41.1k
            }
634
8.04k
        }
635
257k
    }
636
817k
    return Status::OK();
637
817k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.6k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.6k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.6k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
54.6k
    if (_parent->has_projection()) {
622
11.3k
        const auto& projection = *_parent->_projection;
623
11.3k
        _projections.resize(projection.projections.size());
624
111k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.6k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.6k
        }
627
11.3k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
179
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
3.30k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
3.12k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
3.12k
                        state, _intermediate_projections[i][j]));
633
3.12k
            }
634
179
        }
635
11.3k
    }
636
54.6k
    return Status::OK();
637
54.6k
}
_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
6.03k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.03k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.92k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
884
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
884
    }
621
6.03k
    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
6.03k
    return Status::OK();
637
6.03k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
738
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
738
    _conjuncts.resize(_parent->_conjuncts.size());
618
738
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
738
    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
738
    return Status::OK();
637
738
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.10k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.10k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.10k
    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.10k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
227
        for (size_t i = 0; i < _projections.size(); i++) {
625
167
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
167
        }
627
60
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
60
        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
60
    }
636
5.10k
    return Status::OK();
637
5.10k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
607k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
607k
    _conjuncts.resize(_parent->_conjuncts.size());
618
607k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
607k
    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
607k
    return Status::OK();
637
607k
}
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
9.18k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
9.18k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
9.18k
    _terminated = true;
645
9.18k
    return Status::OK();
646
9.18k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
492
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
492
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
492
    _terminated = true;
645
492
    return Status::OK();
646
492
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
20
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
20
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
20
    _terminated = true;
645
20
    return Status::OK();
646
20
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
58
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
58
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
58
    _terminated = true;
645
58
    return Status::OK();
646
58
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
1
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
1
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
1
    _terminated = true;
645
1
    return Status::OK();
646
1
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
166
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
166
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
166
    _terminated = true;
645
166
    return Status::OK();
646
166
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
2
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
2
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
2
    _terminated = true;
645
2
    return Status::OK();
646
2
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
7.20k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
7.20k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
7.20k
    _terminated = true;
645
7.20k
    return Status::OK();
646
7.20k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
39
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
39
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
39
    _terminated = true;
645
39
    return Status::OK();
646
39
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
28
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
28
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
28
    _terminated = true;
645
28
    return Status::OK();
646
28
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
158
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
158
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
158
    _terminated = true;
645
158
    return Status::OK();
646
158
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
982
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
982
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
982
    _terminated = true;
645
982
    return Status::OK();
646
982
}
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.14M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.14M
    if (_closed) {
651
227k
        return Status::OK();
652
227k
    }
653
1.91M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.10M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.10M
    }
656
1.91M
    _closed = true;
657
1.91M
    return Status::OK();
658
2.14M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
73.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
73.4k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
73.4k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
73.4k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
73.4k
    }
656
73.4k
    _closed = true;
657
73.4k
    return Status::OK();
658
73.4k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
4
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
4
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
4
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
4
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
4
    }
656
4
    _closed = true;
657
4
    return Status::OK();
658
4
}
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
393k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
393k
    if (_closed) {
651
197k
        return Status::OK();
652
197k
    }
653
196k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
196k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
196k
    }
656
196k
    _closed = true;
657
196k
    return Status::OK();
658
393k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
28
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
28
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
28
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
28
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
28
    }
656
28
    _closed = true;
657
28
    return Status::OK();
658
28
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.54k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.54k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.54k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.54k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.54k
    }
656
6.54k
    _closed = true;
657
6.54k
    return Status::OK();
658
6.54k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
18.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
18.8k
    if (_closed) {
651
9.52k
        return Status::OK();
652
9.52k
    }
653
9.34k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
9.34k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
9.34k
    }
656
9.34k
    _closed = true;
657
9.34k
    return Status::OK();
658
18.8k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
92.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
92.3k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
92.3k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
92.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
92.3k
    }
656
92.3k
    _closed = true;
657
92.3k
    return Status::OK();
658
92.3k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
47.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
47.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
47.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
47.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
47.8k
    }
656
47.8k
    _closed = true;
657
47.8k
    return Status::OK();
658
47.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
229
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
229
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
229
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
229
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
229
    }
656
229
    _closed = true;
657
229
    return Status::OK();
658
229
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
832k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
832k
    if (_closed) {
651
14.4k
        return Status::OK();
652
14.4k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
818k
    _closed = true;
657
818k
    return Status::OK();
658
832k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.6k
    }
656
54.6k
    _closed = true;
657
54.6k
    return Status::OK();
658
54.6k
}
_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
6.00k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.00k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.00k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.00k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.00k
    }
656
6.00k
    _closed = true;
657
6.00k
    return Status::OK();
658
6.00k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
1.26k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
1.26k
    if (_closed) {
651
635
        return Status::OK();
652
635
    }
653
634
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
634
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
634
    }
656
634
    _closed = true;
657
634
    return Status::OK();
658
1.26k
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
10.3k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
10.3k
    if (_closed) {
651
5.22k
        return Status::OK();
652
5.22k
    }
653
5.10k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.10k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.10k
    }
656
5.10k
    _closed = true;
657
5.10k
    return Status::OK();
658
10.3k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
608k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
608k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
608k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
608k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
608k
    }
656
608k
    _closed = true;
657
608k
    return Status::OK();
658
608k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
337
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
337
    if (_closed) {
651
177
        return Status::OK();
652
177
    }
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
337
}
659
660
template <typename SharedState>
661
1.61M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.61M
    _operator_profile =
664
1.61M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.61M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.61M
    _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.61M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.61M
    _operator_profile->add_child(_common_profile, true);
673
1.61M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.61M
    _operator_profile->set_metadata(_parent->node_id());
676
1.61M
    _wait_for_finish_dependency_timer =
677
1.61M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.61M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.61M
    if constexpr (!is_fake_shared) {
680
1.13M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.13M
            info.shared_state_map.end()) {
682
313k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
249k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
249k
            }
685
313k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
313k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
313k
                                                  ? 0
688
313k
                                                  : info.task_idx]
689
313k
                                  .get();
690
313k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
819k
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
819k
            _shared_state = info.shared_state->template cast<SharedState>();
696
819k
            _dependency = _shared_state->create_sink_dependency(
697
819k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
819k
        }
699
1.13M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.13M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.13M
    }
702
703
1.61M
    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.61M
    _rows_input_counter =
708
1.61M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.61M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.61M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.61M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.61M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.61M
    _memory_used_counter =
714
1.61M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.61M
    _common_profile->add_info_string("IsColocate",
716
1.61M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.61M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.61M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.61M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.61M
    return Status::OK();
721
1.61M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
121k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
121k
    _operator_profile =
664
121k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
121k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
121k
    _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
121k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
121k
    _operator_profile->add_child(_common_profile, true);
673
121k
    _operator_profile->add_child(_custom_profile, true);
674
675
121k
    _operator_profile->set_metadata(_parent->node_id());
676
121k
    _wait_for_finish_dependency_timer =
677
121k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
121k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
121k
    if constexpr (!is_fake_shared) {
680
121k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
121k
            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
16.4k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
16.4k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
16.4k
                                                  ? 0
688
16.4k
                                                  : info.task_idx]
689
16.4k
                                  .get();
690
16.4k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
104k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
104k
            _shared_state = info.shared_state->template cast<SharedState>();
696
104k
            _dependency = _shared_state->create_sink_dependency(
697
104k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
104k
        }
699
121k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
121k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
121k
    }
702
703
121k
    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
121k
    _rows_input_counter =
708
121k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
121k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
121k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
121k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
121k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
121k
    _memory_used_counter =
714
121k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
121k
    _common_profile->add_info_string("IsColocate",
716
121k
                                     std::to_string(_parent->is_colocated_operator()));
717
121k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
121k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
121k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
121k
    return Status::OK();
721
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2
    _operator_profile =
664
2
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2
    _operator_profile->add_child(_common_profile, true);
673
2
    _operator_profile->add_child(_custom_profile, true);
674
675
2
    _operator_profile->set_metadata(_parent->node_id());
676
2
    _wait_for_finish_dependency_timer =
677
2
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2
    if constexpr (!is_fake_shared) {
680
2
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2
            _shared_state = info.shared_state->template cast<SharedState>();
696
2
            _dependency = _shared_state->create_sink_dependency(
697
2
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2
        }
699
2
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2
    }
702
703
2
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2
    _rows_input_counter =
708
2
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2
    _memory_used_counter =
714
2
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2
    _common_profile->add_info_string("IsColocate",
716
2
                                     std::to_string(_parent->is_colocated_operator()));
717
2
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2
    return Status::OK();
721
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
197k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
197k
    _operator_profile =
664
197k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
197k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
197k
    _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
197k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
197k
    _operator_profile->add_child(_common_profile, true);
673
197k
    _operator_profile->add_child(_custom_profile, true);
674
675
197k
    _operator_profile->set_metadata(_parent->node_id());
676
197k
    _wait_for_finish_dependency_timer =
677
197k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
197k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
197k
    if constexpr (!is_fake_shared) {
680
197k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
197k
            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
197k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
197k
            _shared_state = info.shared_state->template cast<SharedState>();
696
197k
            _dependency = _shared_state->create_sink_dependency(
697
197k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
197k
        }
699
197k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
197k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
197k
    }
702
703
197k
    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
197k
    _rows_input_counter =
708
197k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
197k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
197k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
197k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
197k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
197k
    _memory_used_counter =
714
197k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
197k
    _common_profile->add_info_string("IsColocate",
716
197k
                                     std::to_string(_parent->is_colocated_operator()));
717
197k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
197k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
197k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
197k
    return Status::OK();
721
197k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
35
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
35
    _operator_profile =
664
35
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
35
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
35
    _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
35
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
35
    _operator_profile->add_child(_common_profile, true);
673
35
    _operator_profile->add_child(_custom_profile, true);
674
675
35
    _operator_profile->set_metadata(_parent->node_id());
676
35
    _wait_for_finish_dependency_timer =
677
35
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
35
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
35
    if constexpr (!is_fake_shared) {
680
35
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
35
            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
35
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
35
            _shared_state = info.shared_state->template cast<SharedState>();
696
35
            _dependency = _shared_state->create_sink_dependency(
697
35
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
35
        }
699
35
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
35
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
35
    }
702
703
35
    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
35
    _rows_input_counter =
708
35
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
35
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
35
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
35
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
35
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
35
    _memory_used_counter =
714
35
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
35
    _common_profile->add_info_string("IsColocate",
716
35
                                     std::to_string(_parent->is_colocated_operator()));
717
35
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
35
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
35
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
35
    return Status::OK();
721
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
6.52k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
6.52k
    _operator_profile =
664
6.52k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
6.52k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
6.52k
    _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
6.52k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
6.52k
    _operator_profile->add_child(_common_profile, true);
673
6.52k
    _operator_profile->add_child(_custom_profile, true);
674
675
6.52k
    _operator_profile->set_metadata(_parent->node_id());
676
6.52k
    _wait_for_finish_dependency_timer =
677
6.52k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
6.52k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
6.52k
    if constexpr (!is_fake_shared) {
680
6.52k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
6.52k
            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
6.52k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
6.52k
            _shared_state = info.shared_state->template cast<SharedState>();
696
6.52k
            _dependency = _shared_state->create_sink_dependency(
697
6.52k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
6.52k
        }
699
6.52k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
6.52k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
6.52k
    }
702
703
6.52k
    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
6.52k
    _rows_input_counter =
708
6.52k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
6.52k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
6.52k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
6.52k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
6.52k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
6.52k
    _memory_used_counter =
714
6.52k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
6.52k
    _common_profile->add_info_string("IsColocate",
716
6.52k
                                     std::to_string(_parent->is_colocated_operator()));
717
6.52k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
6.52k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
6.52k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
6.52k
    return Status::OK();
721
6.52k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
9.32k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
9.32k
    _operator_profile =
664
9.32k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
9.32k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
9.32k
    _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.32k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
9.32k
    _operator_profile->add_child(_common_profile, true);
673
9.32k
    _operator_profile->add_child(_custom_profile, true);
674
675
9.32k
    _operator_profile->set_metadata(_parent->node_id());
676
9.32k
    _wait_for_finish_dependency_timer =
677
9.32k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
9.32k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
9.32k
    if constexpr (!is_fake_shared) {
680
9.32k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
9.32k
            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.32k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
9.32k
            _shared_state = info.shared_state->template cast<SharedState>();
696
9.32k
            _dependency = _shared_state->create_sink_dependency(
697
9.32k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
9.32k
        }
699
9.32k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
9.32k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
9.32k
    }
702
703
9.32k
    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.32k
    _rows_input_counter =
708
9.32k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
9.32k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
9.32k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
9.32k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
9.32k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
9.32k
    _memory_used_counter =
714
9.32k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
9.32k
    _common_profile->add_info_string("IsColocate",
716
9.32k
                                     std::to_string(_parent->is_colocated_operator()));
717
9.32k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
9.32k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
9.32k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
9.32k
    return Status::OK();
721
9.32k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
92.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
92.3k
    _operator_profile =
664
92.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
92.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
92.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
92.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
92.3k
    _operator_profile->add_child(_common_profile, true);
673
92.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
92.3k
    _operator_profile->set_metadata(_parent->node_id());
676
92.3k
    _wait_for_finish_dependency_timer =
677
92.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
92.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
92.3k
    if constexpr (!is_fake_shared) {
680
92.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
92.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
92.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
92.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
92.3k
            _dependency = _shared_state->create_sink_dependency(
697
92.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
92.3k
        }
699
92.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
92.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
92.3k
    }
702
703
92.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
92.3k
    _rows_input_counter =
708
92.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
92.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
92.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
92.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
92.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
92.3k
    _memory_used_counter =
714
92.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
92.3k
    _common_profile->add_info_string("IsColocate",
716
92.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
92.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
92.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
92.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
92.3k
    return Status::OK();
721
92.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
47.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
47.9k
    _operator_profile =
664
47.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
47.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
47.9k
    _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
47.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
47.9k
    _operator_profile->add_child(_common_profile, true);
673
47.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
47.9k
    _operator_profile->set_metadata(_parent->node_id());
676
47.9k
    _wait_for_finish_dependency_timer =
677
47.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
47.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
47.9k
    if constexpr (!is_fake_shared) {
680
47.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
47.9k
            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
47.9k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
47.9k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
47.9k
                                                  ? 0
688
47.9k
                                                  : info.task_idx]
689
47.9k
                                  .get();
690
47.9k
            _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
47.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
47.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
47.9k
    }
702
703
47.9k
    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
47.9k
    _rows_input_counter =
708
47.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
47.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
47.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
47.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
47.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
47.9k
    _memory_used_counter =
714
47.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
47.9k
    _common_profile->add_info_string("IsColocate",
716
47.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
47.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
47.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
47.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
47.9k
    return Status::OK();
721
47.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
240
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
240
    _operator_profile =
664
240
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
240
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
240
    _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
240
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
240
    _operator_profile->add_child(_common_profile, true);
673
240
    _operator_profile->add_child(_custom_profile, true);
674
675
240
    _operator_profile->set_metadata(_parent->node_id());
676
240
    _wait_for_finish_dependency_timer =
677
240
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
240
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
240
    if constexpr (!is_fake_shared) {
680
240
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
240
            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
240
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
240
            _shared_state = info.shared_state->template cast<SharedState>();
696
240
            _dependency = _shared_state->create_sink_dependency(
697
240
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
240
        }
699
240
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
240
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
240
    }
702
703
240
    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
240
    _rows_input_counter =
708
240
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
240
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
240
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
240
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
240
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
240
    _memory_used_counter =
714
240
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
240
    _common_profile->add_info_string("IsColocate",
716
240
                                     std::to_string(_parent->is_colocated_operator()));
717
240
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
240
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
240
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
240
    return Status::OK();
721
240
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
479k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
479k
    _operator_profile =
664
479k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
479k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
479k
    _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
479k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
479k
    _operator_profile->add_child(_common_profile, true);
673
479k
    _operator_profile->add_child(_custom_profile, true);
674
675
479k
    _operator_profile->set_metadata(_parent->node_id());
676
479k
    _wait_for_finish_dependency_timer =
677
479k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
479k
    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
479k
    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
479k
    _rows_input_counter =
708
479k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
479k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
479k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
479k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
479k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
479k
    _memory_used_counter =
714
479k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
479k
    _common_profile->add_info_string("IsColocate",
716
479k
                                     std::to_string(_parent->is_colocated_operator()));
717
479k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
479k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
479k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
479k
    return Status::OK();
721
479k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
8.81k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
8.81k
    _operator_profile =
664
8.81k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
8.81k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
8.81k
    _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
8.81k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
8.81k
    _operator_profile->add_child(_common_profile, true);
673
8.81k
    _operator_profile->add_child(_custom_profile, true);
674
675
8.81k
    _operator_profile->set_metadata(_parent->node_id());
676
8.81k
    _wait_for_finish_dependency_timer =
677
8.81k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
8.81k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
8.81k
    if constexpr (!is_fake_shared) {
680
8.81k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
8.81k
            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
8.81k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
8.81k
            _shared_state = info.shared_state->template cast<SharedState>();
696
8.81k
            _dependency = _shared_state->create_sink_dependency(
697
8.81k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
8.81k
        }
699
8.81k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
8.81k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
8.81k
    }
702
703
8.81k
    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
8.81k
    _rows_input_counter =
708
8.81k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
8.81k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
8.81k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
8.81k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
8.81k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
8.81k
    _memory_used_counter =
714
8.81k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
8.81k
    _common_profile->add_info_string("IsColocate",
716
8.81k
                                     std::to_string(_parent->is_colocated_operator()));
717
8.81k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
8.81k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
8.81k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
8.81k
    return Status::OK();
721
8.81k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
731
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
731
    _operator_profile =
664
731
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
731
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
731
    _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
731
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
731
    _operator_profile->add_child(_common_profile, true);
673
731
    _operator_profile->add_child(_custom_profile, true);
674
675
731
    _operator_profile->set_metadata(_parent->node_id());
676
731
    _wait_for_finish_dependency_timer =
677
731
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
731
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
731
    if constexpr (!is_fake_shared) {
680
731
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
731
            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
731
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
731
            _shared_state = info.shared_state->template cast<SharedState>();
696
731
            _dependency = _shared_state->create_sink_dependency(
697
731
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
731
        }
699
731
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
731
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
731
    }
702
703
731
    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
731
    _rows_input_counter =
708
731
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
731
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
731
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
731
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
731
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
731
    _memory_used_counter =
714
731
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
731
    _common_profile->add_info_string("IsColocate",
716
731
                                     std::to_string(_parent->is_colocated_operator()));
717
731
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
731
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
731
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
731
    return Status::OK();
721
731
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.21k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.21k
    _operator_profile =
664
2.21k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.21k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.21k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
2.21k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.21k
    _operator_profile->add_child(_common_profile, true);
673
2.21k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.21k
    _operator_profile->set_metadata(_parent->node_id());
676
2.21k
    _wait_for_finish_dependency_timer =
677
2.21k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.21k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.21k
    if constexpr (!is_fake_shared) {
680
2.21k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.21k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
2.21k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.21k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.21k
            _dependency = _shared_state->create_sink_dependency(
697
2.21k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.21k
        }
699
2.21k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.21k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.21k
    }
702
703
2.21k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
2.21k
    _rows_input_counter =
708
2.21k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.21k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.21k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.21k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.21k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.21k
    _memory_used_counter =
714
2.21k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.21k
    _common_profile->add_info_string("IsColocate",
716
2.21k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.21k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.21k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.21k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.21k
    return Status::OK();
721
2.21k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
12.3k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
12.3k
    _operator_profile =
664
12.3k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
12.3k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
12.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
12.3k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
12.3k
    _operator_profile->add_child(_common_profile, true);
673
12.3k
    _operator_profile->add_child(_custom_profile, true);
674
675
12.3k
    _operator_profile->set_metadata(_parent->node_id());
676
12.3k
    _wait_for_finish_dependency_timer =
677
12.3k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
12.3k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
12.3k
    if constexpr (!is_fake_shared) {
680
12.3k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
12.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
12.3k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
12.3k
            _shared_state = info.shared_state->template cast<SharedState>();
696
12.3k
            _dependency = _shared_state->create_sink_dependency(
697
12.3k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
12.3k
        }
699
12.3k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
12.3k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
12.3k
    }
702
703
12.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
12.3k
    _rows_input_counter =
708
12.3k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
12.3k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
12.3k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
12.3k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
12.3k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
12.3k
    _memory_used_counter =
714
12.3k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
12.3k
    _common_profile->add_info_string("IsColocate",
716
12.3k
                                     std::to_string(_parent->is_colocated_operator()));
717
12.3k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
12.3k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
12.3k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
12.3k
    return Status::OK();
721
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_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
249k
            info.shared_state_map.end()) {
682
249k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
249k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
249k
            }
685
249k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
249k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
249k
                                                  ? 0
688
249k
                                                  : info.task_idx]
689
249k
                                  .get();
690
249k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
18.4E
        } else {
692
18.4E
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
18.4E
                DCHECK(false);
694
18.4E
            }
695
18.4E
            _shared_state = info.shared_state->template cast<SharedState>();
696
18.4E
            _dependency = _shared_state->create_sink_dependency(
697
18.4E
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
18.4E
        }
699
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_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
384k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
384k
    _operator_profile =
664
384k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
384k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
384k
    _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
384k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
384k
    _operator_profile->add_child(_common_profile, true);
673
384k
    _operator_profile->add_child(_custom_profile, true);
674
675
384k
    _operator_profile->set_metadata(_parent->node_id());
676
384k
    _wait_for_finish_dependency_timer =
677
384k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
384k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
384k
    if constexpr (!is_fake_shared) {
680
384k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
384k
            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
384k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
384k
            _shared_state = info.shared_state->template cast<SharedState>();
696
384k
            _dependency = _shared_state->create_sink_dependency(
697
384k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
384k
        }
699
384k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
384k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
384k
    }
702
703
384k
    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
384k
    _rows_input_counter =
708
384k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
384k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
384k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
384k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
384k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
384k
    _memory_used_counter =
714
384k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
384k
    _common_profile->add_info_string("IsColocate",
716
384k
                                     std::to_string(_parent->is_colocated_operator()));
717
384k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
384k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
384k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
384k
    return Status::OK();
721
384k
}
_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.61M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.61M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.61M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.13M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.13M
    }
731
1.61M
    _closed = true;
732
1.61M
    return Status::OK();
733
1.61M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
121k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
121k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
121k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
121k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
121k
    }
731
121k
    _closed = true;
732
121k
    return Status::OK();
733
121k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
1
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
1
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1
    }
731
1
    _closed = true;
732
1
    return Status::OK();
733
1
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
197k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
197k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
197k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
197k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
197k
    }
731
197k
    _closed = true;
732
197k
    return Status::OK();
733
197k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
26
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
26
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
24
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
24
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
24
    }
731
24
    _closed = true;
732
24
    return Status::OK();
733
26
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
6.53k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
6.53k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
6.53k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
6.53k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
6.53k
    }
731
6.53k
    _closed = true;
732
6.53k
    return Status::OK();
733
6.53k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
9.33k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
9.33k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
9.33k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
9.33k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
9.33k
    }
731
9.33k
    _closed = true;
732
9.33k
    return Status::OK();
733
9.33k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
92.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
92.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
92.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
92.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
92.1k
    }
731
92.1k
    _closed = true;
732
92.1k
    return Status::OK();
733
92.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
47.8k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
47.8k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
47.8k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
47.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
47.8k
    }
731
47.8k
    _closed = true;
732
47.8k
    return Status::OK();
733
47.8k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
229
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
229
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
229
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
229
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
229
    }
731
229
    _closed = true;
732
229
    return Status::OK();
733
229
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
483k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
483k
    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
483k
    _closed = true;
732
483k
    return Status::OK();
733
483k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
8.80k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
8.80k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
8.80k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
8.80k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
8.80k
    }
731
8.80k
    _closed = true;
732
8.80k
    return Status::OK();
733
8.80k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
634
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
634
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
634
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
634
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
634
    }
731
634
    _closed = true;
732
634
    return Status::OK();
733
634
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.22k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.22k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.22k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.22k
    }
731
2.22k
    _closed = true;
732
2.22k
    return Status::OK();
733
2.22k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
12.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
12.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
12.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
12.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
12.3k
    }
731
12.3k
    _closed = true;
732
12.3k
    return Status::OK();
733
12.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
249k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
249k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
249k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
249k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
249k
    }
731
249k
    _closed = true;
732
249k
    return Status::OK();
733
249k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
386k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
386k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
386k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
386k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
386k
    }
731
386k
    _closed = true;
732
386k
    return Status::OK();
733
386k
}
_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
8.05k
                                                          bool* eos) {
738
8.05k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.05k
    return pull(state, block, eos);
740
8.05k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
36
                                                          bool* eos) {
738
36
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
36
    return pull(state, block, eos);
740
36
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.02k
                                                          bool* eos) {
738
8.02k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.01k
    return pull(state, block, eos);
740
8.02k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
541k
                                                         bool* eos) {
745
541k
    auto& local_state = get_local_state(state);
746
541k
    if (need_more_input_data(state)) {
747
509k
        local_state._child_block->clear_column_data(
748
509k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
509k
                        .num_materialized_slots());
750
509k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
509k
                state, local_state._child_block.get(), &local_state._child_eos));
752
509k
        *eos = local_state._child_eos;
753
509k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
83.0k
            return Status::OK();
755
83.0k
        }
756
426k
        {
757
426k
            SCOPED_TIMER(local_state.exec_time_counter());
758
426k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
426k
        }
760
426k
    }
761
762
458k
    if (!need_more_input_data(state)) {
763
430k
        SCOPED_TIMER(local_state.exec_time_counter());
764
430k
        bool new_eos = false;
765
430k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
430k
        if (new_eos) {
767
343k
            *eos = true;
768
343k
        } else if (!need_more_input_data(state)) {
769
23.7k
            *eos = false;
770
23.7k
        }
771
430k
    }
772
458k
    return Status::OK();
773
458k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
155k
                                                         bool* eos) {
745
155k
    auto& local_state = get_local_state(state);
746
155k
    if (need_more_input_data(state)) {
747
135k
        local_state._child_block->clear_column_data(
748
135k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
135k
                        .num_materialized_slots());
750
135k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
135k
                state, local_state._child_block.get(), &local_state._child_eos));
752
135k
        *eos = local_state._child_eos;
753
135k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
39.1k
            return Status::OK();
755
39.1k
        }
756
96.4k
        {
757
96.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
96.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
96.4k
        }
760
96.4k
    }
761
762
116k
    if (!need_more_input_data(state)) {
763
116k
        SCOPED_TIMER(local_state.exec_time_counter());
764
116k
        bool new_eos = false;
765
116k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
116k
        if (new_eos) {
767
48.9k
            *eos = true;
768
67.6k
        } else if (!need_more_input_data(state)) {
769
10.7k
            *eos = false;
770
10.7k
        }
771
116k
    }
772
116k
    return Status::OK();
773
116k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.30k
                                                         bool* eos) {
745
4.30k
    auto& local_state = get_local_state(state);
746
4.30k
    if (need_more_input_data(state)) {
747
2.41k
        local_state._child_block->clear_column_data(
748
2.41k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.41k
                        .num_materialized_slots());
750
2.41k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.41k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.41k
        *eos = local_state._child_eos;
753
2.41k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
546
            return Status::OK();
755
546
        }
756
1.86k
        {
757
1.86k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.86k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.86k
        }
760
1.86k
    }
761
762
3.75k
    if (!need_more_input_data(state)) {
763
3.75k
        SCOPED_TIMER(local_state.exec_time_counter());
764
3.75k
        bool new_eos = false;
765
3.75k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
3.75k
        if (new_eos) {
767
1.20k
            *eos = true;
768
2.55k
        } else if (!need_more_input_data(state)) {
769
1.89k
            *eos = false;
770
1.89k
        }
771
3.75k
    }
772
3.75k
    return Status::OK();
773
3.75k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.81k
                                                         bool* eos) {
745
1.81k
    auto& local_state = get_local_state(state);
746
1.81k
    if (need_more_input_data(state)) {
747
1.81k
        local_state._child_block->clear_column_data(
748
1.81k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.81k
                        .num_materialized_slots());
750
1.81k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.81k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.81k
        *eos = local_state._child_eos;
753
1.81k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
760
            return Status::OK();
755
760
        }
756
1.05k
        {
757
1.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.05k
        }
760
1.05k
    }
761
762
1.05k
    if (!need_more_input_data(state)) {
763
1.05k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.05k
        bool new_eos = false;
765
1.05k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.05k
        if (new_eos) {
767
781
            *eos = true;
768
781
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.05k
    }
772
1.05k
    return Status::OK();
773
1.05k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.1k
                                                         bool* eos) {
745
20.1k
    auto& local_state = get_local_state(state);
746
20.1k
    if (need_more_input_data(state)) {
747
20.1k
        local_state._child_block->clear_column_data(
748
20.1k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
20.1k
                        .num_materialized_slots());
750
20.1k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
20.1k
                state, local_state._child_block.get(), &local_state._child_eos));
752
20.1k
        *eos = local_state._child_eos;
753
20.1k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
5.37k
            return Status::OK();
755
5.37k
        }
756
14.7k
        {
757
14.7k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.7k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.7k
        }
760
14.7k
    }
761
762
14.7k
    if (!need_more_input_data(state)) {
763
8.76k
        SCOPED_TIMER(local_state.exec_time_counter());
764
8.76k
        bool new_eos = false;
765
8.76k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
8.76k
        if (new_eos) {
767
8.61k
            *eos = true;
768
8.61k
        } else if (!need_more_input_data(state)) {
769
29
            *eos = false;
770
29
        }
771
8.76k
    }
772
14.7k
    return Status::OK();
773
14.7k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
331k
                                                         bool* eos) {
745
331k
    auto& local_state = get_local_state(state);
746
331k
    if (need_more_input_data(state)) {
747
331k
        local_state._child_block->clear_column_data(
748
331k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
331k
                        .num_materialized_slots());
750
331k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
331k
                state, local_state._child_block.get(), &local_state._child_eos));
752
331k
        *eos = local_state._child_eos;
753
331k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
35.6k
            return Status::OK();
755
35.6k
        }
756
296k
        {
757
296k
            SCOPED_TIMER(local_state.exec_time_counter());
758
296k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
296k
        }
760
296k
    }
761
762
295k
    if (!need_more_input_data(state)) {
763
274k
        SCOPED_TIMER(local_state.exec_time_counter());
764
274k
        bool new_eos = false;
765
274k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
274k
        if (new_eos) {
767
273k
            *eos = true;
768
273k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
274k
    }
772
295k
    return Status::OK();
773
295k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
22.2k
                                                         bool* eos) {
745
22.2k
    auto& local_state = get_local_state(state);
746
22.2k
    if (need_more_input_data(state)) {
747
11.5k
        local_state._child_block->clear_column_data(
748
11.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
11.5k
                        .num_materialized_slots());
750
11.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
11.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
11.5k
        *eos = local_state._child_eos;
753
11.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
694
            return Status::OK();
755
694
        }
756
10.8k
        {
757
10.8k
            SCOPED_TIMER(local_state.exec_time_counter());
758
10.8k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
10.8k
        }
760
10.8k
    }
761
762
21.5k
    if (!need_more_input_data(state)) {
763
20.8k
        SCOPED_TIMER(local_state.exec_time_counter());
764
20.8k
        bool new_eos = false;
765
20.8k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
20.8k
        if (new_eos) {
767
6.51k
            *eos = true;
768
14.3k
        } else if (!need_more_input_data(state)) {
769
10.6k
            *eos = false;
770
10.6k
        }
771
20.8k
    }
772
21.5k
    return Status::OK();
773
21.5k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
6.24k
                                                         bool* eos) {
745
6.24k
    auto& local_state = get_local_state(state);
746
6.24k
    if (need_more_input_data(state)) {
747
5.88k
        local_state._child_block->clear_column_data(
748
5.88k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
5.88k
                        .num_materialized_slots());
750
5.88k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
5.88k
                state, local_state._child_block.get(), &local_state._child_eos));
752
5.88k
        *eos = local_state._child_eos;
753
5.88k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
808
            return Status::OK();
755
808
        }
756
5.07k
        {
757
5.07k
            SCOPED_TIMER(local_state.exec_time_counter());
758
5.07k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
5.07k
        }
760
5.07k
    }
761
762
5.43k
    if (!need_more_input_data(state)) {
763
5.43k
        SCOPED_TIMER(local_state.exec_time_counter());
764
5.43k
        bool new_eos = false;
765
5.43k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
5.43k
        if (new_eos) {
767
3.49k
            *eos = true;
768
3.49k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
5.43k
    }
772
5.43k
    return Status::OK();
773
5.43k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.1k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.1k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.1k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.1k
                                                         "AsyncWriterDependency", true);
781
47.1k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.1k
                             _finish_dependency));
783
784
47.1k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.1k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.1k
    return Status::OK();
787
47.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
350
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
350
    RETURN_IF_ERROR(Base::init(state, info));
779
350
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
350
                                                         "AsyncWriterDependency", true);
781
350
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
350
                             _finish_dependency));
783
784
350
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
350
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
350
    return Status::OK();
787
350
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
46.5k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
46.5k
    RETURN_IF_ERROR(Base::init(state, info));
779
46.5k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
46.5k
                                                         "AsyncWriterDependency", true);
781
46.5k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
46.5k
                             _finish_dependency));
783
784
46.5k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
46.5k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
46.5k
    return Status::OK();
787
46.5k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
332
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
332
    RETURN_IF_ERROR(Base::init(state, info));
779
332
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
332
                                                         "AsyncWriterDependency", true);
781
332
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
332
                             _finish_dependency));
783
784
332
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
332
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
332
    return Status::OK();
787
332
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
788
789
template <typename Writer, typename Parent>
790
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
791
48.0k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.0k
    RETURN_IF_ERROR(Base::open(state));
793
48.0k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
370k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
322k
        RETURN_IF_ERROR(
796
322k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
322k
    }
798
48.0k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.0k
    return Status::OK();
800
48.0k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
350
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
350
    RETURN_IF_ERROR(Base::open(state));
793
350
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.83k
    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
350
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
350
    return Status::OK();
800
350
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
47.3k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
47.3k
    RETURN_IF_ERROR(Base::open(state));
793
47.3k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
366k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
319k
        RETURN_IF_ERROR(
796
319k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
319k
    }
798
47.3k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
47.3k
    return Status::OK();
800
47.3k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
330
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
330
    RETURN_IF_ERROR(Base::open(state));
793
330
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.77k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.44k
        RETURN_IF_ERROR(
796
1.44k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.44k
    }
798
330
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
330
    return Status::OK();
800
330
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4openEPNS_12RuntimeStateE
801
802
template <typename Writer, typename Parent>
803
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
804
63.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.6k
    return _writer->sink(block, eos);
806
63.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.72k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.72k
    return _writer->sink(block, eos);
806
1.72k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
61.6k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
61.6k
    return _writer->sink(block, eos);
806
61.6k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
312
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
312
    return _writer->sink(block, eos);
806
312
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
807
808
template <typename Writer, typename Parent>
809
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
810
48.1k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.1k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.1k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.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
48.1k
    if (_writer) {
818
48.1k
        Status st = _writer->get_writer_status();
819
48.1k
        if (exec_status.ok()) {
820
48.0k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.0k
                                                       : Status::Cancelled("force close"));
822
48.0k
        } else {
823
123
            _writer->force_close(exec_status);
824
123
        }
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
48.1k
        RETURN_IF_ERROR(st);
829
48.1k
    }
830
48.0k
    return Base::close(state, exec_status);
831
48.1k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
336
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
336
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
336
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
336
    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
336
    if (_writer) {
818
336
        Status st = _writer->get_writer_status();
819
336
        if (exec_status.ok()) {
820
336
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
336
                                                       : Status::Cancelled("force close"));
822
336
        } 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
336
        RETURN_IF_ERROR(st);
829
336
    }
830
336
    return Base::close(state, exec_status);
831
336
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
47.4k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
47.4k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
47.4k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
47.4k
    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
47.4k
    if (_writer) {
818
47.4k
        Status st = _writer->get_writer_status();
819
47.4k
        if (exec_status.ok()) {
820
47.3k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
47.3k
                                                       : Status::Cancelled("force close"));
822
47.3k
        } else {
823
115
            _writer->force_close(exec_status);
824
115
        }
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
47.4k
        RETURN_IF_ERROR(st);
829
47.4k
    }
830
47.4k
    return Base::close(state, exec_status);
831
47.4k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
324
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
324
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
324
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
324
    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
324
    if (_writer) {
818
324
        Status st = _writer->get_writer_status();
819
324
        if (exec_status.ok()) {
820
316
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
316
                                                       : Status::Cancelled("force close"));
822
316
        } else {
823
8
            _writer->force_close(exec_status);
824
8
        }
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
324
        RETURN_IF_ERROR(st);
829
324
    }
830
324
    return Base::close(state, exec_status);
831
324
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VHiveTableWriterENS_22HiveTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_25IcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_19VIcebergTableWriterENS_30SpillIcebergTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_18VIcebergDeleteSinkENS_26IcebergDeleteSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_17VIcebergMergeSinkENS_25IcebergMergeSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_14VMCTableWriterENS_20MCTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_15VTVFTableWriterENS_21TVFTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
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(SpillIcebergTableSinkLocalState)
850
DECLARE_OPERATOR(IcebergDeleteSinkLocalState)
851
DECLARE_OPERATOR(IcebergMergeSinkLocalState)
852
DECLARE_OPERATOR(MCTableSinkLocalState)
853
DECLARE_OPERATOR(AnalyticSinkLocalState)
854
DECLARE_OPERATOR(BlackholeSinkLocalState)
855
DECLARE_OPERATOR(SortSinkLocalState)
856
DECLARE_OPERATOR(SpillSortSinkLocalState)
857
DECLARE_OPERATOR(LocalExchangeSinkLocalState)
858
DECLARE_OPERATOR(AggSinkLocalState)
859
DECLARE_OPERATOR(BucketedAggSinkLocalState)
860
DECLARE_OPERATOR(PartitionedAggSinkLocalState)
861
DECLARE_OPERATOR(ExchangeSinkLocalState)
862
DECLARE_OPERATOR(NestedLoopJoinBuildSinkLocalState)
863
DECLARE_OPERATOR(UnionSinkLocalState)
864
DECLARE_OPERATOR(MultiCastDataStreamSinkLocalState)
865
DECLARE_OPERATOR(PartitionSortSinkLocalState)
866
DECLARE_OPERATOR(SetProbeSinkLocalState<true>)
867
DECLARE_OPERATOR(SetProbeSinkLocalState<false>)
868
DECLARE_OPERATOR(SetSinkLocalState<true>)
869
DECLARE_OPERATOR(SetSinkLocalState<false>)
870
DECLARE_OPERATOR(PartitionedHashJoinSinkLocalState)
871
DECLARE_OPERATOR(GroupCommitBlockSinkLocalState)
872
DECLARE_OPERATOR(CacheSinkLocalState)
873
DECLARE_OPERATOR(DictSinkLocalState)
874
DECLARE_OPERATOR(RecCTESinkLocalState)
875
DECLARE_OPERATOR(RecCTEAnchorSinkLocalState)
876
877
#undef DECLARE_OPERATOR
878
879
#define DECLARE_OPERATOR(LOCAL_STATE) template class OperatorX<LOCAL_STATE>;
880
DECLARE_OPERATOR(HashJoinProbeLocalState)
881
DECLARE_OPERATOR(OlapScanLocalState)
882
DECLARE_OPERATOR(GroupCommitLocalState)
883
DECLARE_OPERATOR(JDBCScanLocalState)
884
DECLARE_OPERATOR(FileScanLocalState)
885
DECLARE_OPERATOR(AnalyticLocalState)
886
DECLARE_OPERATOR(SortLocalState)
887
DECLARE_OPERATOR(SpillSortLocalState)
888
DECLARE_OPERATOR(LocalMergeSortLocalState)
889
DECLARE_OPERATOR(AggLocalState)
890
DECLARE_OPERATOR(BucketedAggLocalState)
891
DECLARE_OPERATOR(PartitionedAggLocalState)
892
DECLARE_OPERATOR(TableFunctionLocalState)
893
DECLARE_OPERATOR(ExchangeLocalState)
894
DECLARE_OPERATOR(RepeatLocalState)
895
DECLARE_OPERATOR(NestedLoopJoinProbeLocalState)
896
DECLARE_OPERATOR(AssertNumRowsLocalState)
897
DECLARE_OPERATOR(EmptySetLocalState)
898
DECLARE_OPERATOR(UnionSourceLocalState)
899
DECLARE_OPERATOR(MultiCastDataStreamSourceLocalState)
900
DECLARE_OPERATOR(PartitionSortSourceLocalState)
901
DECLARE_OPERATOR(SetSourceLocalState<true>)
902
DECLARE_OPERATOR(SetSourceLocalState<false>)
903
DECLARE_OPERATOR(DataGenLocalState)
904
DECLARE_OPERATOR(SchemaScanLocalState)
905
DECLARE_OPERATOR(MetaScanLocalState)
906
DECLARE_OPERATOR(LocalExchangeSourceLocalState)
907
DECLARE_OPERATOR(PartitionedHashJoinProbeLocalState)
908
DECLARE_OPERATOR(CacheSourceLocalState)
909
DECLARE_OPERATOR(RecCTESourceLocalState)
910
DECLARE_OPERATOR(RecCTEScanLocalState)
911
912
#ifdef BE_TEST
913
DECLARE_OPERATOR(MockLocalState)
914
DECLARE_OPERATOR(MockScanLocalState)
915
#endif
916
#undef DECLARE_OPERATOR
917
918
template class StreamingOperatorX<AssertNumRowsLocalState>;
919
template class StreamingOperatorX<SelectLocalState>;
920
921
template class StatefulOperatorX<HashJoinProbeLocalState>;
922
template class StatefulOperatorX<PartitionedHashJoinProbeLocalState>;
923
template class StatefulOperatorX<RepeatLocalState>;
924
template class StatefulOperatorX<MaterializationLocalState>;
925
template class StatefulOperatorX<StreamingAggLocalState>;
926
template class StatefulOperatorX<DistinctStreamingAggLocalState>;
927
template class StatefulOperatorX<NestedLoopJoinProbeLocalState>;
928
template class StatefulOperatorX<TableFunctionLocalState>;
929
930
template class PipelineXSinkLocalState<HashJoinSharedState>;
931
template class PipelineXSinkLocalState<PartitionedHashJoinSharedState>;
932
template class PipelineXSinkLocalState<SortSharedState>;
933
template class PipelineXSinkLocalState<SpillSortSharedState>;
934
template class PipelineXSinkLocalState<NestedLoopJoinSharedState>;
935
template class PipelineXSinkLocalState<AnalyticSharedState>;
936
template class PipelineXSinkLocalState<AggSharedState>;
937
template class PipelineXSinkLocalState<BucketedAggSharedState>;
938
template class PipelineXSinkLocalState<PartitionedAggSharedState>;
939
template class PipelineXSinkLocalState<FakeSharedState>;
940
template class PipelineXSinkLocalState<UnionSharedState>;
941
template class PipelineXSinkLocalState<PartitionSortNodeSharedState>;
942
template class PipelineXSinkLocalState<MultiCastSharedState>;
943
template class PipelineXSinkLocalState<SetSharedState>;
944
template class PipelineXSinkLocalState<LocalExchangeSharedState>;
945
template class PipelineXSinkLocalState<BasicSharedState>;
946
template class PipelineXSinkLocalState<DataQueueSharedState>;
947
template class PipelineXSinkLocalState<RecCTESharedState>;
948
949
template class PipelineXLocalState<HashJoinSharedState>;
950
template class PipelineXLocalState<PartitionedHashJoinSharedState>;
951
template class PipelineXLocalState<SortSharedState>;
952
template class PipelineXLocalState<SpillSortSharedState>;
953
template class PipelineXLocalState<NestedLoopJoinSharedState>;
954
template class PipelineXLocalState<AnalyticSharedState>;
955
template class PipelineXLocalState<AggSharedState>;
956
template class PipelineXLocalState<BucketedAggSharedState>;
957
template class PipelineXLocalState<PartitionedAggSharedState>;
958
template class PipelineXLocalState<FakeSharedState>;
959
template class PipelineXLocalState<UnionSharedState>;
960
template class PipelineXLocalState<DataQueueSharedState>;
961
template class PipelineXLocalState<MultiCastSharedState>;
962
template class PipelineXLocalState<PartitionSortNodeSharedState>;
963
template class PipelineXLocalState<SetSharedState>;
964
template class PipelineXLocalState<LocalExchangeSharedState>;
965
template class PipelineXLocalState<BasicSharedState>;
966
template class PipelineXLocalState<RecCTESharedState>;
967
968
template class AsyncWriterSink<doris::VFileResultWriter, ResultFileSinkOperatorX>;
969
template class AsyncWriterSink<doris::VJdbcTableWriter, JdbcTableSinkOperatorX>;
970
template class AsyncWriterSink<doris::VTabletWriter, OlapTableSinkOperatorX>;
971
template class AsyncWriterSink<doris::VTabletWriterV2, OlapTableSinkV2OperatorX>;
972
template class AsyncWriterSink<doris::VHiveTableWriter, HiveTableSinkOperatorX>;
973
template class AsyncWriterSink<doris::VIcebergTableWriter, IcebergTableSinkOperatorX>;
974
template class AsyncWriterSink<doris::VIcebergTableWriter, SpillIcebergTableSinkOperatorX>;
975
template class AsyncWriterSink<doris::VIcebergDeleteSink, IcebergDeleteSinkOperatorX>;
976
template class AsyncWriterSink<doris::VIcebergMergeSink, IcebergMergeSinkOperatorX>;
977
template class AsyncWriterSink<doris::VMCTableWriter, MCTableSinkOperatorX>;
978
template class AsyncWriterSink<doris::VTVFTableWriter, TVFTableSinkOperatorX>;
979
980
#ifdef BE_TEST
981
template class OperatorX<DummyOperatorLocalState>;
982
template class DataSinkOperatorX<DummySinkLocalState>;
983
#endif
984
985
} // namespace doris