Coverage Report

Created: 2026-09-30 07:26

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.69M
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
1.69M
    if (_parent->nereids_id() == -1) {
122
872k
        return fmt::format("(id={})", _parent->node_id());
123
872k
    } else {
124
824k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
824k
    }
126
1.69M
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
67.4k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
67.4k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
67.4k
    } else {
124
67.4k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
67.4k
    }
126
67.4k
}
_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
216k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
216k
    if (_parent->nereids_id() == -1) {
122
12
        return fmt::format("(id={})", _parent->node_id());
123
216k
    } else {
124
216k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
216k
    }
126
216k
}
_ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
37
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
37
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
37
    } else {
124
37
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
37
    }
126
37
}
_ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.87k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.87k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
5.87k
    } else {
124
5.87k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.87k
    }
126
5.87k
}
_ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
10.1k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
10.1k
    if (_parent->nereids_id() == -1) {
122
16
        return fmt::format("(id={})", _parent->node_id());
123
10.0k
    } else {
124
10.0k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
10.0k
    }
126
10.1k
}
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
94.9k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
94.9k
    if (_parent->nereids_id() == -1) {
122
29
        return fmt::format("(id={})", _parent->node_id());
123
94.9k
    } else {
124
94.9k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
94.9k
    }
126
94.9k
}
_ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
98.5k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
98.5k
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
98.5k
    } else {
124
98.5k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
98.5k
    }
126
98.5k
}
_ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
174
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
174
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
174
    } else {
124
174
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
174
    }
126
174
}
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
527k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
527k
    if (_parent->nereids_id() == -1) {
122
259k
        return fmt::format("(id={})", _parent->node_id());
123
268k
    } else {
124
268k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
268k
    }
126
527k
}
_ZNK5doris19PipelineXLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
54.6k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
54.6k
    if (_parent->nereids_id() == -1) {
122
2
        return fmt::format("(id={})", _parent->node_id());
123
54.6k
    } else {
124
54.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
54.6k
    }
126
54.6k
}
_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.22k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
6.23k
    if (_parent->nereids_id() == -1) {
122
6.23k
        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.22k
}
_ZNK5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
470
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
470
    if (_parent->nereids_id() == -1) {
122
102
        return fmt::format("(id={})", _parent->node_id());
123
368
    } else {
124
368
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
368
    }
126
470
}
_ZNK5doris19PipelineXLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
5.26k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
5.26k
    if (_parent->nereids_id() == -1) {
122
13
        return fmt::format("(id={})", _parent->node_id());
123
5.25k
    } else {
124
5.25k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
5.25k
    }
126
5.26k
}
_ZNK5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
608k
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
608k
    if (_parent->nereids_id() == -1) {
122
607k
        return fmt::format("(id={})", _parent->node_id());
123
607k
    } else {
124
1.25k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
1.25k
    }
126
608k
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
_ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
120
169
std::string PipelineXLocalState<SharedStateArg>::name_suffix() const {
121
169
    if (_parent->nereids_id() == -1) {
122
0
        return fmt::format("(id={})", _parent->node_id());
123
169
    } else {
124
169
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
125
169
    }
126
169
}
127
128
template <typename SharedStateArg>
129
1.22M
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
1.22M
    if (_parent->nereids_id() == -1) {
131
667k
        return fmt::format("(id={})", _parent->node_id());
132
667k
    } else {
133
555k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
555k
    }
135
1.22M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
116k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
116k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
116k
    } else {
133
116k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
116k
    }
135
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
2
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
2
    if (_parent->nereids_id() == -1) {
131
1
        return fmt::format("(id={})", _parent->node_id());
132
1
    } else {
133
1
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
1
    }
135
2
}
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
221k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
221k
    if (_parent->nereids_id() == -1) {
131
9
        return fmt::format("(id={})", _parent->node_id());
132
221k
    } else {
133
221k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
221k
    }
135
221k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
44
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
44
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
44
    } else {
133
44
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
44
    }
135
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
5.87k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
5.87k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
5.87k
    } else {
133
5.87k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
5.87k
    }
135
5.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
10.1k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
10.1k
    if (_parent->nereids_id() == -1) {
131
16
        return fmt::format("(id={})", _parent->node_id());
132
10.1k
    } else {
133
10.1k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
10.1k
    }
135
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
95.6k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
95.6k
    if (_parent->nereids_id() == -1) {
131
29
        return fmt::format("(id={})", _parent->node_id());
132
95.6k
    } else {
133
95.6k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
95.6k
    }
135
95.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
98.2k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
98.2k
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
98.2k
    } else {
133
98.2k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
98.2k
    }
135
98.2k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
184
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
184
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
184
    } else {
133
184
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
184
    }
135
184
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
6
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
6
    if (_parent->nereids_id() == -1) {
131
6
        return fmt::format("(id={})", _parent->node_id());
132
6
    } else {
133
0
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
0
    }
135
6
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
7.95k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
7.95k
    if (_parent->nereids_id() == -1) {
131
3
        return fmt::format("(id={})", _parent->node_id());
132
7.95k
    } else {
133
7.95k
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
7.95k
    }
135
7.95k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
471
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
471
    if (_parent->nereids_id() == -1) {
131
102
        return fmt::format("(id={})", _parent->node_id());
132
369
    } else {
133
369
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
369
    }
135
471
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE11name_suffixB5cxx11Ev
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
12.9k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
13.0k
    if (_parent->nereids_id() == -1) {
131
13.0k
        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.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
229k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
230k
    if (_parent->nereids_id() == -1) {
131
230k
        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
229k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE11name_suffixB5cxx11Ev
Line
Count
Source
129
423k
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
424k
    if (_parent->nereids_id() == -1) {
131
424k
        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
423k
}
_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
336
std::string PipelineXSinkLocalState<SharedStateArg>::name_suffix() {
130
336
    if (_parent->nereids_id() == -1) {
131
0
        return fmt::format("(id={})", _parent->node_id());
132
336
    } else {
133
336
        return fmt::format("(nereids_id={}, id={})", _parent->nereids_id(), _parent->node_id());
134
336
    }
135
336
}
136
137
template <typename SharedStateArg>
138
31.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
31.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
31.0k
    _terminated = true;
143
31.0k
    return Status::OK();
144
31.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
24.0k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
24.0k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
24.0k
    _terminated = true;
143
24.0k
    return Status::OK();
144
24.0k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2.35k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2.35k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2.35k
    _terminated = true;
143
2.35k
    return Status::OK();
144
2.35k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
2
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
2
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
2
    _terminated = true;
143
2
    return Status::OK();
144
2
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1
    _terminated = true;
143
1
    return Status::OK();
144
1
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.89k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.89k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.89k
    _terminated = true;
143
1.89k
    return Status::OK();
144
1.89k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
1.23k
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
1.23k
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
1.23k
    _terminated = true;
143
1.23k
    return Status::OK();
144
1.23k
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
495
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
495
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
495
    _terminated = true;
143
495
    return Status::OK();
144
495
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
309
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
309
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
309
    _terminated = true;
143
309
    return Status::OK();
144
309
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_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_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
291
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
291
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
291
    _terminated = true;
143
291
    return Status::OK();
144
291
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
15
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
15
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
15
    _terminated = true;
143
15
    return Status::OK();
144
15
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
300
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
300
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
300
    _terminated = true;
143
300
    return Status::OK();
144
300
}
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
138
131
Status PipelineXSinkLocalState<SharedStateArg>::terminate(RuntimeState* state) {
139
131
    if (_terminated) {
140
0
        return Status::OK();
141
0
    }
142
131
    _terminated = true;
143
131
    return Status::OK();
144
131
}
145
146
300k
DataDistribution OperatorBase::required_data_distribution(RuntimeState* /*state*/) const {
147
300k
    return _child && _child->is_serial_operator() && !is_source()
148
300k
                   ? DataDistribution(TLocalPartitionType::PASSTHROUGH)
149
300k
                   : DataDistribution(TLocalPartitionType::NOOP);
150
300k
}
151
152
17.8k
bool OperatorBase::child_breaks_local_key_distribution(RuntimeState* state) const {
153
17.8k
    if (!_child) {
154
16.4k
        return false;
155
16.4k
    }
156
1.34k
    if (_child->is_serial_operator()) {
157
214
        return true;
158
214
    }
159
1.12k
    const auto child_distribution = _child->required_data_distribution(state);
160
1.12k
    return child_distribution.need_local_exchange() &&
161
1.12k
           !is_shuffled_exchange(child_distribution.distribution_type);
162
1.34k
}
163
164
template <typename SharedStateArg>
165
15.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
15.1k
    fmt::memory_buffer debug_string_buffer;
167
15.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
15.1k
    return fmt::to_string(debug_string_buffer);
169
15.1k
}
_ZNK5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14
    fmt::memory_buffer debug_string_buffer;
167
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14
    return fmt::to_string(debug_string_buffer);
169
14
}
_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
7
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
7
    fmt::memory_buffer debug_string_buffer;
167
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
7
    return fmt::to_string(debug_string_buffer);
169
7
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
7
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
7
    fmt::memory_buffer debug_string_buffer;
167
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
7
    return fmt::to_string(debug_string_buffer);
169
7
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris19PipelineXLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
165
15.1k
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
15.1k
    fmt::memory_buffer debug_string_buffer;
167
15.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
15.1k
    return fmt::to_string(debug_string_buffer);
169
15.1k
}
_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
14
std::string PipelineXLocalState<SharedStateArg>::debug_string(int indentation_level) const {
166
14
    fmt::memory_buffer debug_string_buffer;
167
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
168
14
    return fmt::to_string(debug_string_buffer);
169
14
}
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris19PipelineXLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
170
171
template <typename SharedStateArg>
172
15.1k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
15.1k
    fmt::memory_buffer debug_string_buffer;
174
15.1k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
15.1k
    return fmt::to_string(debug_string_buffer);
176
15.1k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15SortSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
7
    fmt::memory_buffer debug_string_buffer;
174
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
7
    return fmt::to_string(debug_string_buffer);
176
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
7
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
7
    fmt::memory_buffer debug_string_buffer;
174
7
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
7
    return fmt::to_string(debug_string_buffer);
176
7
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE12debug_stringB5cxx11Ei
_ZNK5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
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
14
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
14
    fmt::memory_buffer debug_string_buffer;
174
14
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
14
    return fmt::to_string(debug_string_buffer);
176
14
}
_ZNK5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE12debug_stringB5cxx11Ei
Line
Count
Source
172
15.0k
std::string PipelineXSinkLocalState<SharedStateArg>::debug_string(int indentation_level) const {
173
15.0k
    fmt::memory_buffer debug_string_buffer;
174
15.0k
    fmt::format_to(debug_string_buffer, "{}", _parent->debug_string(indentation_level));
175
15.0k
    return fmt::to_string(debug_string_buffer);
176
15.0k
}
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_20DataQueueSharedStateEE12debug_stringB5cxx11Ei
Unexecuted instantiation: _ZNK5doris23PipelineXSinkLocalStateINS_17RecCTESharedStateEE12debug_stringB5cxx11Ei
177
178
15.1k
std::string OperatorXBase::debug_string(int indentation_level) const {
179
15.1k
    fmt::memory_buffer debug_string_buffer;
180
15.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, parallel_tasks={}, _is_serial_operator={}",
181
15.1k
                   std::string(indentation_level * 2, ' '), _op_name, node_id(), _parallel_tasks,
182
15.1k
                   _is_serial_operator);
183
15.1k
    return fmt::to_string(debug_string_buffer);
184
15.1k
}
185
186
15.1k
std::string OperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
187
15.1k
    return state->get_local_state(operator_id())->debug_string(indentation_level);
188
15.1k
}
189
190
657k
Status OperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
191
657k
    std::string node_name = print_plan_node_type(tnode.node_type);
192
657k
    _nereids_id = tnode.nereids_id;
193
657k
    if (!tnode.intermediate_output_tuple_id_list.empty()) {
194
5.61k
        if (!has_projection()) {
195
0
            return Status::InternalError("no final output tuple id");
196
0
        }
197
5.61k
        if (tnode.intermediate_output_tuple_id_list.size() !=
198
5.61k
            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
5.61k
    }
206
657k
    auto substr = node_name.substr(0, node_name.find("_NODE"));
207
657k
    _op_name = substr + "_OPERATOR";
208
209
657k
    if (tnode.__isset.vconjunct) {
210
0
        return Status::InternalError("vconjunct is not supported yet");
211
657k
    } else if (tnode.__isset.conjuncts) {
212
277k
        for (const auto& conjunct : tnode.conjuncts) {
213
277k
            VExprContextSPtr context;
214
277k
            RETURN_IF_ERROR(VExpr::create_expr_tree(conjunct, context));
215
277k
            _conjuncts.emplace_back(context);
216
277k
        }
217
102k
    }
218
219
    // create the projections expr
220
657k
    if (tnode.__isset.projections) {
221
268k
        RETURN_IF_ERROR(VExpr::create_expr_trees(tnode.projections, _projection->projections));
222
268k
    }
223
657k
    if (!tnode.intermediate_projections_list.empty()) {
224
5.61k
        DCHECK(has_projection()) << "no final projections";
225
5.61k
        _projection->intermediate_projections.reserve(tnode.intermediate_projections_list.size());
226
9.37k
        for (const auto& tnode_projections : tnode.intermediate_projections_list) {
227
9.37k
            VExprContextSPtrs projections;
228
9.37k
            RETURN_IF_ERROR(VExpr::create_expr_trees(tnode_projections, projections));
229
9.37k
            _projection->intermediate_projections.push_back(projections);
230
9.37k
        }
231
5.61k
    }
232
657k
    return Status::OK();
233
657k
}
234
235
685k
Status OperatorXBase::prepare(RuntimeState* state) {
236
685k
    for (auto& conjunct : _conjuncts) {
237
277k
        RETURN_IF_ERROR(conjunct->prepare(state, operator_row_desc_before_projection()));
238
277k
    }
239
685k
    if (state->enable_adjust_conjunct_order_by_cost()) {
240
635k
        std::ranges::stable_sort(_conjuncts, [](const auto& a, const auto& b) {
241
342k
            return a->execute_cost() < b->execute_cost();
242
342k
        });
243
635k
    };
244
245
685k
    if (has_projection()) {
246
268k
        auto& projection = *_projection;
247
277k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
248
9.37k
            const auto& input_row_desc =
249
9.37k
                    i == 0 ? operator_row_desc_before_projection()
250
9.37k
                           : projection.intermediate_output_row_descriptors[i - 1];
251
9.37k
            RETURN_IF_ERROR(
252
9.37k
                    VExpr::prepare(projection.intermediate_projections[i], state, input_row_desc));
253
9.37k
        }
254
268k
        const auto& final_projection_input_row_desc =
255
268k
                projection.intermediate_output_row_descriptors.empty()
256
268k
                        ? operator_row_desc_before_projection()
257
268k
                        : projection.intermediate_output_row_descriptors.back();
258
268k
        RETURN_IF_ERROR(
259
268k
                VExpr::prepare(projection.projections, state, final_projection_input_row_desc));
260
268k
        RETURN_IF_ERROR(VExpr::check_expr_output_type(projection.projections,
261
268k
                                                      projection.output_row_descriptor));
262
268k
    }
263
264
685k
    for (auto& conjunct : _conjuncts) {
265
277k
        RETURN_IF_ERROR(conjunct->open(state));
266
277k
    }
267
685k
    if (has_projection()) {
268
268k
        RETURN_IF_ERROR(VExpr::open(_projection->projections, state));
269
268k
        for (auto& projections : _projection->intermediate_projections) {
270
9.37k
            RETURN_IF_ERROR(VExpr::open(projections, state));
271
9.37k
        }
272
268k
    }
273
685k
    if (_child && !is_source()) {
274
84.5k
        RETURN_IF_ERROR(_child->prepare(state));
275
84.5k
    }
276
277
685k
    if (VExpr::contains_blockable_function(_conjuncts) ||
278
685k
        (has_projection() && VExpr::contains_blockable_function(_projection->projections))) {
279
0
        _blockable = true;
280
0
    }
281
282
685k
    return Status::OK();
283
685k
}
284
285
8.00k
Status OperatorXBase::terminate(RuntimeState* state) {
286
8.00k
    if (_child && !is_source()) {
287
931
        RETURN_IF_ERROR(_child->terminate(state));
288
931
    }
289
8.00k
    auto result = state->get_local_state_result(operator_id());
290
8.00k
    if (!result) {
291
0
        return result.error();
292
0
    }
293
8.00k
    return result.value()->terminate(state);
294
8.00k
}
295
296
4.57M
Status OperatorXBase::close(RuntimeState* state) {
297
4.57M
    if (_child && !is_source()) {
298
666k
        RETURN_IF_ERROR(_child->close(state));
299
666k
    }
300
4.57M
    auto result = state->get_local_state_result(operator_id());
301
4.57M
    if (!result) {
302
0
        return result.error();
303
0
    }
304
4.57M
    return result.value()->close(state);
305
4.57M
}
306
307
278k
void PipelineXLocalStateBase::clear_origin_block() {
308
278k
    _origin_block.clear_column_data(
309
278k
            _parent->operator_row_desc_before_projection().num_materialized_slots());
310
278k
}
311
312
915k
Status PipelineXLocalStateBase::filter_block(const VExprContextSPtrs& expr_contexts, Block* block) {
313
915k
    RETURN_IF_ERROR(VExprContext::filter_block(expr_contexts, block, block->columns()));
314
315
915k
    _estimate_memory_usage += VExprContext::get_memory_usage(expr_contexts);
316
915k
    return Status::OK();
317
915k
}
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
278k
                                     Block* output_block) const {
326
278k
    auto* local_state = state->get_local_state(operator_id());
327
278k
    SCOPED_TIMER(local_state->exec_time_counter());
328
278k
    SCOPED_TIMER(local_state->_projection_timer);
329
278k
    const size_t rows = origin_block->rows();
330
278k
    if (rows == 0) {
331
139k
        return Status::OK();
332
139k
    }
333
138k
    SCOPED_PEAK_MEM(&local_state->_estimate_memory_usage);
334
335
138k
    {
336
138k
        Block input_block = *origin_block;
337
338
138k
        ColumnsWithTypeAndName new_columns;
339
138k
        for (const auto& projections : local_state->_intermediate_projections) {
340
3.10k
            if (projections.empty()) {
341
0
                return Status::InternalError("meet empty intermediate projection, node id: {}",
342
0
                                             node_id());
343
0
            }
344
3.10k
            new_columns.resize(projections.size());
345
51.0k
            for (int i = 0; i < projections.size(); i++) {
346
47.9k
                RETURN_IF_ERROR(projections[i]->execute(&input_block, new_columns[i]));
347
47.9k
                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
47.9k
            }
355
3.09k
            Block tmp_block {new_columns};
356
3.09k
            input_block.swap(tmp_block);
357
3.09k
        }
358
359
138k
        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
138k
        auto scoped_mutable_block = VectorizedUtils::build_scoped_mutable_mem_reuse_block(
367
138k
                output_block, _projection->output_row_descriptor);
368
138k
        auto& mutable_columns = scoped_mutable_block.mutable_columns();
369
138k
        DCHECK_EQ(mutable_columns.size(), local_state->_projections.size()) << debug_string();
370
138k
        Columns shared_columns(mutable_columns.size());
371
372
789k
        for (int i = 0; i < mutable_columns.size(); ++i) {
373
650k
            ColumnPtr column_ptr;
374
650k
            RETURN_IF_ERROR(local_state->_projections[i]->execute(&input_block, column_ptr));
375
650k
            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
650k
            column_ptr = column_ptr->convert_to_full_column_if_const();
382
650k
            if (is_column_nullable(*mutable_columns[i]) && !is_column_nullable(*column_ptr)) {
383
0
                column_ptr = make_nullable(column_ptr, false);
384
0
            }
385
650k
            if (column_ptr->is_exclusive()) {
386
229k
                mutable_columns[i] = IColumn::mutate(std::move(column_ptr));
387
420k
            } else {
388
420k
                shared_columns[i] = std::move(column_ptr);
389
420k
            }
390
650k
        }
391
392
138k
        scoped_mutable_block.restore();
393
789k
        for (int i = 0; i < shared_columns.size(); ++i) {
394
650k
            if (shared_columns[i]) {
395
420k
                output_block->replace_by_position(i, std::move(shared_columns[i]));
396
420k
            }
397
650k
        }
398
138k
    }
399
400
0
    origin_block->clear_column_data(
401
138k
            local_state->_parent->operator_row_desc_before_projection().num_materialized_slots());
402
138k
    DCHECK_EQ(output_block->rows(), rows);
403
404
138k
    return Status::OK();
405
138k
}
406
407
4.24M
Status OperatorXBase::get_block_after_projects(RuntimeState* state, Block* block, bool* eos) {
408
4.24M
    DBUG_EXECUTE_IF("Pipeline::return_empty_block", {
409
4.24M
        if (this->_op_name == "AGGREGATION_OPERATOR" || this->_op_name == "HASH_JOIN_OPERATOR" ||
410
4.24M
            this->_op_name == "PARTITIONED_AGGREGATION_OPERATOR" ||
411
4.24M
            this->_op_name == "PARTITIONED_HASH_JOIN_OPERATOR" ||
412
4.24M
            this->_op_name == "CROSS_JOIN_OPERATOR" || this->_op_name == "SORT_OPERATOR") {
413
4.24M
            if (_debug_point_count++ % 2 == 0) {
414
4.24M
                return Status::OK();
415
4.24M
            }
416
4.24M
        }
417
4.24M
    });
418
419
4.24M
    Status status;
420
4.24M
    auto* local_state = state->get_local_state(operator_id());
421
4.24M
    Defer defer([&]() {
422
4.24M
        if (status.ok()) {
423
4.24M
            local_state->update_output_block_counters(*block);
424
4.24M
        }
425
4.24M
    });
426
4.24M
    if (has_projection()) {
427
278k
        local_state->clear_origin_block();
428
278k
        status = get_block(state, &local_state->_origin_block, eos);
429
278k
        if (UNLIKELY(!status.ok())) {
430
25
            return status;
431
25
        }
432
278k
        status = do_projections(state, &local_state->_origin_block, block);
433
278k
        return status;
434
278k
    }
435
3.96M
    status = get_block(state, block, eos);
436
3.96M
    RETURN_IF_ERROR(block->check_type_and_column());
437
3.96M
    return status;
438
3.96M
}
439
440
2.89M
void PipelineXLocalStateBase::reached_limit(Block* block, bool* eos) {
441
2.89M
    if (_parent->_limit != -1 and _num_rows_returned + block->rows() >= _parent->_limit) {
442
9.61k
        block->set_num_rows(_parent->_limit - _num_rows_returned);
443
9.61k
        *eos = true;
444
9.61k
    }
445
446
2.89M
    DBUG_EXECUTE_IF("Pipeline::reached_limit_early", {
447
2.89M
        auto op_name = to_lower(_parent->_op_name);
448
2.89M
        auto arg_op_name = dp->param<std::string>("op_name");
449
2.89M
        arg_op_name = to_lower(arg_op_name);
450
451
2.89M
        if (op_name == arg_op_name) {
452
2.89M
            *eos = true;
453
2.89M
        }
454
2.89M
    });
455
456
2.89M
    if (auto rows = block->rows()) {
457
747k
        _num_rows_returned += rows;
458
747k
        _state->get_query_ctx()->resource_ctx()->io_context()->update_process_rows(rows);
459
747k
    }
460
2.89M
}
461
462
31.0k
Status DataSinkOperatorXBase::terminate(RuntimeState* state) {
463
31.0k
    auto result = state->get_sink_local_state_result();
464
31.0k
    if (!result) {
465
0
        return result.error();
466
0
    }
467
31.0k
    return result.value()->terminate(state);
468
31.0k
}
469
470
15.1k
std::string DataSinkOperatorXBase::debug_string(int indentation_level) const {
471
15.1k
    fmt::memory_buffer debug_string_buffer;
472
473
15.1k
    fmt::format_to(debug_string_buffer, "{}{}: id={}, _is_serial_operator={}",
474
15.1k
                   std::string(indentation_level * 2, ' '), _name, node_id(), _is_serial_operator);
475
15.1k
    return fmt::to_string(debug_string_buffer);
476
15.1k
}
477
478
15.1k
std::string DataSinkOperatorXBase::debug_string(RuntimeState* state, int indentation_level) const {
479
15.1k
    return state->get_sink_local_state()->debug_string(indentation_level);
480
15.1k
}
481
482
347k
Status DataSinkOperatorXBase::init(const TDataSink& tsink) {
483
347k
    std::string op_name = "UNKNOWN_SINK";
484
347k
    auto it = _TDataSinkType_VALUES_TO_NAMES.find(tsink.type);
485
486
347k
    if (it != _TDataSinkType_VALUES_TO_NAMES.end()) {
487
347k
        op_name = it->second;
488
347k
    }
489
347k
    _name = op_name + "_OPERATOR";
490
347k
    return Status::OK();
491
347k
}
492
493
299k
Status DataSinkOperatorXBase::init(const TPlanNode& tnode, RuntimeState* state) {
494
299k
    std::string op_name = print_plan_node_type(tnode.node_type);
495
299k
    _nereids_id = tnode.nereids_id;
496
299k
    auto substr = op_name.substr(0, op_name.find("_NODE"));
497
299k
    _name = substr + "_SINK_OPERATOR";
498
299k
    return Status::OK();
499
299k
}
500
501
template <typename LocalStateType>
502
Status DataSinkOperatorX<LocalStateType>::setup_local_state(RuntimeState* state,
503
1.71M
                                                            LocalSinkStateInfo& info) {
504
1.71M
    auto local_state = LocalStateType::create_unique(this, state);
505
1.71M
    RETURN_IF_ERROR(local_state->init(state, info));
506
1.71M
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
1.71M
    return Status::OK();
508
1.71M
}
_ZN5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
116k
                                                            LocalSinkStateInfo& info) {
504
116k
    auto local_state = LocalStateType::create_unique(this, state);
505
116k
    RETURN_IF_ERROR(local_state->init(state, info));
506
116k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
116k
    return Status::OK();
508
116k
}
_ZN5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
376k
                                                            LocalSinkStateInfo& info) {
504
376k
    auto local_state = LocalStateType::create_unique(this, state);
505
376k
    RETURN_IF_ERROR(local_state->init(state, info));
506
376k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
376k
    return Status::OK();
508
376k
}
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
357
                                                            LocalSinkStateInfo& info) {
504
357
    auto local_state = LocalStateType::create_unique(this, state);
505
357
    RETURN_IF_ERROR(local_state->init(state, info));
506
357
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
357
    return Status::OK();
508
357
}
_ZN5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
47.7k
                                                            LocalSinkStateInfo& info) {
504
47.7k
    auto local_state = LocalStateType::create_unique(this, state);
505
47.7k
    RETURN_IF_ERROR(local_state->init(state, info));
506
47.7k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
47.7k
    return Status::OK();
508
47.7k
}
_ZN5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
40
                                                            LocalSinkStateInfo& info) {
504
40
    auto local_state = LocalStateType::create_unique(this, state);
505
40
    RETURN_IF_ERROR(local_state->init(state, info));
506
40
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
40
    return Status::OK();
508
40
}
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
10.1k
                                                            LocalSinkStateInfo& info) {
504
10.1k
    auto local_state = LocalStateType::create_unique(this, state);
505
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
506
10.1k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
10.1k
    return Status::OK();
508
10.1k
}
_ZN5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE17setup_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_18SortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
222k
                                                            LocalSinkStateInfo& info) {
504
222k
    auto local_state = LocalStateType::create_unique(this, state);
505
222k
    RETURN_IF_ERROR(local_state->init(state, info));
506
222k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
222k
    return Status::OK();
508
222k
}
_ZN5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
44
                                                            LocalSinkStateInfo& info) {
504
44
    auto local_state = LocalStateType::create_unique(this, state);
505
44
    RETURN_IF_ERROR(local_state->init(state, info));
506
44
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
44
    return Status::OK();
508
44
}
_ZN5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
230k
                                                            LocalSinkStateInfo& info) {
504
230k
    auto local_state = LocalStateType::create_unique(this, state);
505
230k
    RETURN_IF_ERROR(local_state->init(state, info));
506
230k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
230k
    return Status::OK();
508
230k
}
_ZN5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
95.6k
                                                            LocalSinkStateInfo& info) {
504
95.6k
    auto local_state = LocalStateType::create_unique(this, state);
505
95.6k
    RETURN_IF_ERROR(local_state->init(state, info));
506
95.6k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
95.6k
    return Status::OK();
508
95.6k
}
_ZN5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
98.2k
                                                            LocalSinkStateInfo& info) {
504
98.2k
    auto local_state = LocalStateType::create_unique(this, state);
505
98.2k
    RETURN_IF_ERROR(local_state->init(state, info));
506
98.2k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
98.2k
    return Status::OK();
508
98.2k
}
_ZN5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
184
                                                            LocalSinkStateInfo& info) {
504
184
    auto local_state = LocalStateType::create_unique(this, state);
505
184
    RETURN_IF_ERROR(local_state->init(state, info));
506
184
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
184
    return Status::OK();
508
184
}
_ZN5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
482k
                                                            LocalSinkStateInfo& info) {
504
482k
    auto local_state = LocalStateType::create_unique(this, state);
505
482k
    RETURN_IF_ERROR(local_state->init(state, info));
506
482k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
482k
    return Status::OK();
508
482k
}
_ZN5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.87k
                                                            LocalSinkStateInfo& info) {
504
5.87k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.87k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.87k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.87k
    return Status::OK();
508
5.87k
}
_ZN5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
7.96k
                                                            LocalSinkStateInfo& info) {
504
7.96k
    auto local_state = LocalStateType::create_unique(this, state);
505
7.96k
    RETURN_IF_ERROR(local_state->init(state, info));
506
7.96k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
7.96k
    return Status::OK();
508
7.96k
}
_ZN5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.31k
                                                            LocalSinkStateInfo& info) {
504
2.31k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.31k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.31k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.31k
    return Status::OK();
508
2.31k
}
_ZN5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
369
                                                            LocalSinkStateInfo& info) {
504
369
    auto local_state = LocalStateType::create_unique(this, state);
505
369
    RETURN_IF_ERROR(local_state->init(state, info));
506
369
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
369
    return Status::OK();
508
369
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
5.03k
                                                            LocalSinkStateInfo& info) {
504
5.03k
    auto local_state = LocalStateType::create_unique(this, state);
505
5.03k
    RETURN_IF_ERROR(local_state->init(state, info));
506
5.03k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
5.03k
    return Status::OK();
508
5.03k
}
_ZN5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.68k
                                                            LocalSinkStateInfo& info) {
504
2.68k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.68k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.68k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.68k
    return Status::OK();
508
2.68k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.73k
                                                            LocalSinkStateInfo& info) {
504
2.73k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.73k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.73k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.73k
    return Status::OK();
508
2.73k
}
_ZN5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
2.50k
                                                            LocalSinkStateInfo& info) {
504
2.50k
    auto local_state = LocalStateType::create_unique(this, state);
505
2.50k
    RETURN_IF_ERROR(local_state->init(state, info));
506
2.50k
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
2.50k
    return Status::OK();
508
2.50k
}
_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
561
                                                            LocalSinkStateInfo& info) {
504
561
    auto local_state = LocalStateType::create_unique(this, state);
505
561
    RETURN_IF_ERROR(local_state->init(state, info));
506
561
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
561
    return Status::OK();
508
561
}
_ZN5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
14
                                                            LocalSinkStateInfo& info) {
504
14
    auto local_state = LocalStateType::create_unique(this, state);
505
14
    RETURN_IF_ERROR(local_state->init(state, info));
506
14
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
14
    return Status::OK();
508
14
}
_ZN5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
106
                                                            LocalSinkStateInfo& info) {
504
106
    auto local_state = LocalStateType::create_unique(this, state);
505
106
    RETURN_IF_ERROR(local_state->init(state, info));
506
106
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
106
    return Status::OK();
508
106
}
_ZN5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
503
168
                                                            LocalSinkStateInfo& info) {
504
168
    auto local_state = LocalStateType::create_unique(this, state);
505
168
    RETURN_IF_ERROR(local_state->init(state, info));
506
168
    state->emplace_sink_local_state(operator_id(), std::move(local_state));
507
168
    return Status::OK();
508
168
}
_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.35M
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.35M
    } else {
519
1.35M
        auto ss = LocalStateType::SharedStateType::create_shared();
520
1.35M
        ss->id = operator_id();
521
1.35M
        for (auto& dest : dests_id()) {
522
1.33M
            ss->related_op_ids.insert(dest);
523
1.33M
        }
524
1.35M
        return ss;
525
1.35M
    }
526
1.35M
}
_ZNK5doris17DataSinkOperatorXINS_27HashJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
100k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
100k
    } else {
519
100k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
100k
        ss->id = operator_id();
521
100k
        for (auto& dest : dests_id()) {
522
100k
            ss->related_op_ids.insert(dest);
523
100k
        }
524
100k
        return ss;
525
100k
    }
526
100k
}
_ZNK5doris17DataSinkOperatorXINS_20ResultSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
376k
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
376k
    } else {
519
376k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
376k
        ss->id = operator_id();
521
376k
        for (auto& dest : dests_id()) {
522
374k
            ss->related_op_ids.insert(dest);
523
374k
        }
524
376k
        return ss;
525
376k
    }
526
376k
}
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
357
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
357
    } else {
519
357
        auto ss = LocalStateType::SharedStateType::create_shared();
520
357
        ss->id = operator_id();
521
357
        for (auto& dest : dests_id()) {
522
357
            ss->related_op_ids.insert(dest);
523
357
        }
524
357
        return ss;
525
357
    }
526
357
}
_ZNK5doris17DataSinkOperatorXINS_23OlapTableSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
47.8k
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.8k
    } else {
519
47.8k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
47.8k
        ss->id = operator_id();
521
47.8k
        for (auto& dest : dests_id()) {
522
47.6k
            ss->related_op_ids.insert(dest);
523
47.6k
        }
524
47.8k
        return ss;
525
47.8k
    }
526
47.8k
}
_ZNK5doris17DataSinkOperatorXINS_25OlapTableSinkV2LocalStateEE19create_shared_stateEv
Line
Count
Source
511
40
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
40
    } else {
519
40
        auto ss = LocalStateType::SharedStateType::create_shared();
520
40
        ss->id = operator_id();
521
40
        for (auto& dest : dests_id()) {
522
40
            ss->related_op_ids.insert(dest);
523
40
        }
524
40
        return ss;
525
40
    }
526
40
}
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
10.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
10.1k
    } else {
519
10.1k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
10.1k
        ss->id = operator_id();
521
10.1k
        for (auto& dest : dests_id()) {
522
10.1k
            ss->related_op_ids.insert(dest);
523
10.1k
        }
524
10.1k
        return ss;
525
10.1k
    }
526
10.1k
}
_ZNK5doris17DataSinkOperatorXINS_23BlackholeSinkLocalStateEE19create_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_18SortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
223k
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
223k
    } else {
519
223k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
223k
        ss->id = operator_id();
521
223k
        for (auto& dest : dests_id()) {
522
223k
            ss->related_op_ids.insert(dest);
523
223k
        }
524
223k
        return ss;
525
223k
    }
526
223k
}
_ZNK5doris17DataSinkOperatorXINS_23SpillSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
46
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
46
    } else {
519
46
        auto ss = LocalStateType::SharedStateType::create_shared();
520
46
        ss->id = operator_id();
521
46
        for (auto& dest : dests_id()) {
522
46
            ss->related_op_ids.insert(dest);
523
46
        }
524
46
        return ss;
525
46
    }
526
46
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_27LocalExchangeSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17AggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
95.9k
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
95.9k
    } else {
519
95.9k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
95.9k
        ss->id = operator_id();
521
95.9k
        for (auto& dest : dests_id()) {
522
95.9k
            ss->related_op_ids.insert(dest);
523
95.9k
        }
524
95.9k
        return ss;
525
95.9k
    }
526
95.9k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_25BucketedAggSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_28PartitionedAggSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
183
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
183
    } else {
519
183
        auto ss = LocalStateType::SharedStateType::create_shared();
520
183
        ss->id = operator_id();
521
183
        for (auto& dest : dests_id()) {
522
183
            ss->related_op_ids.insert(dest);
523
183
        }
524
183
        return ss;
525
183
    }
526
183
}
_ZNK5doris17DataSinkOperatorXINS_22ExchangeSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
485k
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
485k
    } else {
519
485k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
485k
        ss->id = operator_id();
521
485k
        for (auto& dest : dests_id()) {
522
475k
            ss->related_op_ids.insert(dest);
523
475k
        }
524
485k
        return ss;
525
485k
    }
526
485k
}
_ZNK5doris17DataSinkOperatorXINS_33NestedLoopJoinBuildSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
5.88k
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
5.88k
    } else {
519
5.88k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
5.88k
        ss->id = operator_id();
521
5.88k
        for (auto& dest : dests_id()) {
522
5.87k
            ss->related_op_ids.insert(dest);
523
5.87k
        }
524
5.88k
        return ss;
525
5.88k
    }
526
5.88k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19UnionSinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33MultiCastDataStreamSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_27PartitionSortSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
471
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
471
    } else {
519
471
        auto ss = LocalStateType::SharedStateType::create_shared();
520
471
        ss->id = operator_id();
521
471
        for (auto& dest : dests_id()) {
522
469
            ss->related_op_ids.insert(dest);
523
469
        }
524
471
        return ss;
525
471
    }
526
471
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb1EEEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_22SetProbeSinkLocalStateILb0EEEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb1EEEE19create_shared_stateEv
Line
Count
Source
511
2.71k
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.71k
    } else {
519
2.71k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.71k
        ss->id = operator_id();
521
2.71k
        for (auto& dest : dests_id()) {
522
2.70k
            ss->related_op_ids.insert(dest);
523
2.70k
        }
524
2.71k
        return ss;
525
2.71k
    }
526
2.71k
}
_ZNK5doris17DataSinkOperatorXINS_17SetSinkLocalStateILb0EEEE19create_shared_stateEv
Line
Count
Source
511
2.50k
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.50k
    } else {
519
2.50k
        auto ss = LocalStateType::SharedStateType::create_shared();
520
2.50k
        ss->id = operator_id();
521
2.50k
        for (auto& dest : dests_id()) {
522
2.50k
            ss->related_op_ids.insert(dest);
523
2.50k
        }
524
2.50k
        return ss;
525
2.50k
    }
526
2.50k
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_33PartitionedHashJoinSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_30GroupCommitBlockSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
566
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
566
    } else {
519
566
        auto ss = LocalStateType::SharedStateType::create_shared();
520
566
        ss->id = operator_id();
521
566
        for (auto& dest : dests_id()) {
522
556
            ss->related_op_ids.insert(dest);
523
556
        }
524
566
        return ss;
525
566
    }
526
566
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_19CacheSinkLocalStateEE19create_shared_stateEv
_ZNK5doris17DataSinkOperatorXINS_18DictSinkLocalStateEE19create_shared_stateEv
Line
Count
Source
511
106
std::shared_ptr<BasicSharedState> DataSinkOperatorX<LocalStateType>::create_shared_state() const {
512
    if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
513
                                 LocalExchangeSharedState>) {
514
        return nullptr;
515
    } else if constexpr (std::is_same_v<typename LocalStateType::SharedStateType,
516
                                        MultiCastSharedState>) {
517
        throw Exception(Status::FatalError("should not reach here!"));
518
106
    } else {
519
106
        auto ss = LocalStateType::SharedStateType::create_shared();
520
106
        ss->id = operator_id();
521
106
        for (auto& dest : dests_id()) {
522
106
            ss->related_op_ids.insert(dest);
523
106
        }
524
106
        return ss;
525
106
    }
526
106
}
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_20RecCTESinkLocalStateEE19create_shared_stateEv
Unexecuted instantiation: _ZNK5doris17DataSinkOperatorXINS_26RecCTEAnchorSinkLocalStateEE19create_shared_stateEv
527
528
template <typename LocalStateType>
529
1.97M
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.97M
    auto local_state = LocalStateType::create_unique(state, this);
531
1.97M
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.97M
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.97M
    return Status::OK();
534
1.97M
}
_ZN5doris9OperatorXINS_23HashJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
68.2k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
68.2k
    auto local_state = LocalStateType::create_unique(state, this);
531
68.2k
    RETURN_IF_ERROR(local_state->init(state, info));
532
68.2k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
68.2k
    return Status::OK();
534
68.2k
}
_ZN5doris9OperatorXINS_18OlapScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
250k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
250k
    auto local_state = LocalStateType::create_unique(state, this);
531
250k
    RETURN_IF_ERROR(local_state->init(state, info));
532
250k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
250k
    return Status::OK();
534
250k
}
_ZN5doris9OperatorXINS_21GroupCommitLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
149
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
149
    auto local_state = LocalStateType::create_unique(state, this);
531
149
    RETURN_IF_ERROR(local_state->init(state, info));
532
149
    state->emplace_local_state(operator_id(), std::move(local_state));
533
149
    return Status::OK();
534
149
}
Unexecuted instantiation: _ZN5doris9OperatorXINS_18JDBCScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
_ZN5doris9OperatorXINS_18FileScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
3.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
3.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
3.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
3.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
3.22k
    return Status::OK();
534
3.22k
}
_ZN5doris9OperatorXINS_18AnalyticLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.1k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.1k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.1k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.1k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.1k
    return Status::OK();
534
10.1k
}
_ZN5doris9OperatorXINS_14SortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
9.22k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
9.22k
    auto local_state = LocalStateType::create_unique(state, this);
531
9.22k
    RETURN_IF_ERROR(local_state->init(state, info));
532
9.22k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
9.22k
    return Status::OK();
534
9.22k
}
_ZN5doris9OperatorXINS_19SpillSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
37
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
37
    auto local_state = LocalStateType::create_unique(state, this);
531
37
    RETURN_IF_ERROR(local_state->init(state, info));
532
37
    state->emplace_local_state(operator_id(), std::move(local_state));
533
37
    return Status::OK();
534
37
}
_ZN5doris9OperatorXINS_24LocalMergeSortLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
212k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
212k
    auto local_state = LocalStateType::create_unique(state, this);
531
212k
    RETURN_IF_ERROR(local_state->init(state, info));
532
212k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
212k
    return Status::OK();
534
212k
}
_ZN5doris9OperatorXINS_13AggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
95.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
95.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
95.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
95.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
95.4k
    return Status::OK();
534
95.4k
}
_ZN5doris9OperatorXINS_21BucketedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
98.7k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
98.7k
    auto local_state = LocalStateType::create_unique(state, this);
531
98.7k
    RETURN_IF_ERROR(local_state->init(state, info));
532
98.7k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
98.7k
    return Status::OK();
534
98.7k
}
_ZN5doris9OperatorXINS_24PartitionedAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
174
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
174
    auto local_state = LocalStateType::create_unique(state, this);
531
174
    RETURN_IF_ERROR(local_state->init(state, info));
532
174
    state->emplace_local_state(operator_id(), std::move(local_state));
533
174
    return Status::OK();
534
174
}
_ZN5doris9OperatorXINS_23TableFunctionLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
4.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
4.41k
    auto local_state = LocalStateType::create_unique(state, this);
531
4.41k
    RETURN_IF_ERROR(local_state->init(state, info));
532
4.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
4.41k
    return Status::OK();
534
4.41k
}
_ZN5doris9OperatorXINS_18ExchangeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
260k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
260k
    auto local_state = LocalStateType::create_unique(state, this);
531
260k
    RETURN_IF_ERROR(local_state->init(state, info));
532
260k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
260k
    return Status::OK();
534
260k
}
_ZN5doris9OperatorXINS_16RepeatLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.41k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.41k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.41k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.41k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.41k
    return Status::OK();
534
1.41k
}
_ZN5doris9OperatorXINS_29NestedLoopJoinProbeLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
5.87k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
5.87k
    auto local_state = LocalStateType::create_unique(state, this);
531
5.87k
    RETURN_IF_ERROR(local_state->init(state, info));
532
5.87k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
5.87k
    return Status::OK();
534
5.87k
}
_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.55k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.55k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.55k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.55k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.55k
    return Status::OK();
534
1.55k
}
_ZN5doris9OperatorXINS_21UnionSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
54.6k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
54.6k
    auto local_state = LocalStateType::create_unique(state, this);
531
54.6k
    RETURN_IF_ERROR(local_state->init(state, info));
532
54.6k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
54.6k
    return Status::OK();
534
54.6k
}
_ZN5doris9OperatorXINS_35MultiCastDataStreamSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.25k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.25k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.25k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.25k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.25k
    return Status::OK();
534
6.25k
}
_ZN5doris9OperatorXINS_29PartitionSortSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
369
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
369
    auto local_state = LocalStateType::create_unique(state, this);
531
369
    RETURN_IF_ERROR(local_state->init(state, info));
532
369
    state->emplace_local_state(operator_id(), std::move(local_state));
533
369
    return Status::OK();
534
369
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb1EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.73k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.73k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.73k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.73k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.73k
    return Status::OK();
534
2.73k
}
_ZN5doris9OperatorXINS_19SetSourceLocalStateILb0EEEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
2.52k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.52k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.52k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.52k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.52k
    return Status::OK();
534
2.52k
}
_ZN5doris9OperatorXINS_17DataGenLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
412
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
412
    auto local_state = LocalStateType::create_unique(state, this);
531
412
    RETURN_IF_ERROR(local_state->init(state, info));
532
412
    state->emplace_local_state(operator_id(), std::move(local_state));
533
412
    return Status::OK();
534
412
}
_ZN5doris9OperatorXINS_20SchemaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.69k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.69k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.69k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.69k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.69k
    return Status::OK();
534
1.69k
}
_ZN5doris9OperatorXINS_18MetaScanLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
10.4k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
10.4k
    auto local_state = LocalStateType::create_unique(state, this);
531
10.4k
    RETURN_IF_ERROR(local_state->init(state, info));
532
10.4k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
10.4k
    return Status::OK();
534
10.4k
}
_ZN5doris9OperatorXINS_29LocalExchangeSourceLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
617k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
617k
    auto local_state = LocalStateType::create_unique(state, this);
531
617k
    RETURN_IF_ERROR(local_state->init(state, info));
532
617k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
617k
    return Status::OK();
534
617k
}
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.21k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
2.21k
    auto local_state = LocalStateType::create_unique(state, this);
531
2.21k
    RETURN_IF_ERROR(local_state->init(state, info));
532
2.21k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
2.21k
    return Status::OK();
534
2.21k
}
_ZN5doris9OperatorXINS_25MaterializationLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
796
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
796
    auto local_state = LocalStateType::create_unique(state, this);
531
796
    RETURN_IF_ERROR(local_state->init(state, info));
532
796
    state->emplace_local_state(operator_id(), std::move(local_state));
533
796
    return Status::OK();
534
796
}
_ZN5doris9OperatorXINS_16SelectLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
1.17k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
1.17k
    auto local_state = LocalStateType::create_unique(state, this);
531
1.17k
    RETURN_IF_ERROR(local_state->init(state, info));
532
1.17k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
1.17k
    return Status::OK();
534
1.17k
}
_ZN5doris9OperatorXINS_22StreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
6.07k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
6.07k
    auto local_state = LocalStateType::create_unique(state, this);
531
6.07k
    RETURN_IF_ERROR(local_state->init(state, info));
532
6.07k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
6.07k
    return Status::OK();
534
6.07k
}
_ZN5doris9OperatorXINS_30DistinctStreamingAggLocalStateEE17setup_local_stateEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
529
241k
Status OperatorX<LocalStateType>::setup_local_state(RuntimeState* state, LocalStateInfo& info) {
530
241k
    auto local_state = LocalStateType::create_unique(state, this);
531
241k
    RETURN_IF_ERROR(local_state->init(state, info));
532
241k
    state->emplace_local_state(operator_id(), std::move(local_state));
533
241k
    return Status::OK();
534
241k
}
535
536
PipelineXSinkLocalStateBase::PipelineXSinkLocalStateBase(DataSinkOperatorXBase* parent,
537
                                                         RuntimeState* state)
538
1.70M
        : _parent(parent), _state(state) {}
539
540
PipelineXLocalStateBase::PipelineXLocalStateBase(RuntimeState* state, OperatorXBase* parent)
541
1.95M
        : _num_rows_returned(0),
542
1.95M
          _rows_returned_counter(nullptr),
543
1.95M
          _parent(parent),
544
1.95M
          _state(state),
545
1.95M
          _budget(state->batch_size(), state->preferred_block_size_bytes()) {}
546
547
template <typename SharedStateArg>
548
1.97M
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
1.97M
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
1.97M
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
1.97M
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
1.97M
    _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.97M
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
1.97M
    _operator_profile->add_child(_common_profile.get(), true);
557
1.97M
    _operator_profile->add_child(_custom_profile.get(), true);
558
1.97M
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
1.97M
    if constexpr (!is_fake_shared) {
560
1.18M
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
725k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
725k
                                    .first.get()
563
725k
                                    ->template cast<SharedStateArg>();
564
565
725k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
725k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
725k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
725k
        } else if (info.shared_state) {
569
391k
            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
391k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
391k
            _dependency = _shared_state->create_source_dependency(
576
391k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
391k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
391k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
391k
        } else {
580
72.9k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.4k
                DCHECK(false);
582
10.4k
            }
583
72.9k
        }
584
1.18M
    }
585
586
1.97M
    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.97M
    _rows_returned_counter =
591
1.97M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
1.97M
    _blocks_returned_counter =
593
1.97M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
1.97M
    _output_block_bytes_counter =
595
1.97M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
1.97M
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
1.97M
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
1.97M
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
1.97M
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
1.97M
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
1.97M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
1.97M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
1.97M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
1.97M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
1.97M
    _memory_used_counter =
606
1.97M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
1.97M
    _common_profile->add_info_string("IsColocate",
608
1.97M
                                     std::to_string(_parent->is_colocated_operator()));
609
1.97M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
1.97M
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
1.97M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
1.97M
    return Status::OK();
613
1.97M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
67.9k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
67.9k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
67.9k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
67.9k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
67.9k
    _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
67.9k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
67.9k
    _operator_profile->add_child(_common_profile.get(), true);
557
67.9k
    _operator_profile->add_child(_custom_profile.get(), true);
558
67.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
67.9k
    if constexpr (!is_fake_shared) {
560
67.9k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
15.7k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
15.7k
                                    .first.get()
563
15.7k
                                    ->template cast<SharedStateArg>();
564
565
15.7k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
15.7k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
15.7k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
52.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
51.6k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
51.6k
            _dependency = _shared_state->create_source_dependency(
576
51.6k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
51.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
51.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.6k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
507
        }
584
67.9k
    }
585
586
67.9k
    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
67.9k
    _rows_returned_counter =
591
67.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
67.9k
    _blocks_returned_counter =
593
67.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
67.9k
    _output_block_bytes_counter =
595
67.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
67.9k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
67.9k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
67.9k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
67.9k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
67.9k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
67.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
67.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
67.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
67.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
67.9k
    _memory_used_counter =
606
67.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
67.9k
    _common_profile->add_info_string("IsColocate",
608
67.9k
                                     std::to_string(_parent->is_colocated_operator()));
609
67.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
67.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
67.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
67.9k
    return Status::OK();
613
67.9k
}
_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
222k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
222k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
222k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
222k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
222k
    _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
222k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
222k
    _operator_profile->add_child(_common_profile.get(), true);
557
222k
    _operator_profile->add_child(_custom_profile.get(), true);
558
222k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
222k
    if constexpr (!is_fake_shared) {
560
222k
        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
222k
        } 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
213k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
213k
            _dependency = _shared_state->create_source_dependency(
576
213k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
213k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
213k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
213k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
8.79k
        }
584
222k
    }
585
586
222k
    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
222k
    _rows_returned_counter =
591
222k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
222k
    _blocks_returned_counter =
593
222k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
222k
    _output_block_bytes_counter =
595
222k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
222k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
222k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
222k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
222k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
222k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
222k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
222k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
222k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
222k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
222k
    _memory_used_counter =
606
222k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
222k
    _common_profile->add_info_string("IsColocate",
608
222k
                                     std::to_string(_parent->is_colocated_operator()));
609
222k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
222k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
222k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
222k
    return Status::OK();
613
222k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
37
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
37
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
37
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
37
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
37
    _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
37
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
37
    _operator_profile->add_child(_common_profile.get(), true);
557
37
    _operator_profile->add_child(_custom_profile.get(), true);
558
37
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
37
    if constexpr (!is_fake_shared) {
560
37
        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
37
        } 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
37
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
37
            _dependency = _shared_state->create_source_dependency(
576
37
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
37
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
37
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
37
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
37
    }
585
586
37
    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
37
    _rows_returned_counter =
591
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
37
    _blocks_returned_counter =
593
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
37
    _output_block_bytes_counter =
595
37
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
37
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
37
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
37
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
37
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
37
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
37
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
37
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
37
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
37
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
37
    _memory_used_counter =
606
37
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
37
    _common_profile->add_info_string("IsColocate",
608
37
                                     std::to_string(_parent->is_colocated_operator()));
609
37
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
37
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
37
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
37
    return Status::OK();
613
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.87k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.87k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.87k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.87k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.87k
    _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.87k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.87k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.87k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.87k
    if constexpr (!is_fake_shared) {
560
5.87k
        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.87k
        } 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.85k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.85k
            _dependency = _shared_state->create_source_dependency(
576
5.85k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.85k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.85k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.85k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18
        }
584
5.87k
    }
585
586
5.87k
    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.87k
    _rows_returned_counter =
591
5.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.87k
    _blocks_returned_counter =
593
5.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.87k
    _output_block_bytes_counter =
595
5.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.87k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.87k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.87k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.87k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.87k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.87k
    _memory_used_counter =
606
5.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.87k
    _common_profile->add_info_string("IsColocate",
608
5.87k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.87k
    return Status::OK();
613
5.87k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
10.1k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
10.1k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
10.1k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
10.1k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
10.1k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
10.1k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
10.1k
    _operator_profile->add_child(_common_profile.get(), true);
557
10.1k
    _operator_profile->add_child(_custom_profile.get(), true);
558
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
10.1k
    if constexpr (!is_fake_shared) {
560
10.1k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
10.1k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
10.1k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
10.1k
            _dependency = _shared_state->create_source_dependency(
576
10.1k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
10.1k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
10.1k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.1k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
50
        }
584
10.1k
    }
585
586
10.1k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
10.1k
    _rows_returned_counter =
591
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
10.1k
    _blocks_returned_counter =
593
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
10.1k
    _output_block_bytes_counter =
595
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
10.1k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
10.1k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
10.1k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
10.1k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
10.1k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
10.1k
    _memory_used_counter =
606
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
10.1k
    _common_profile->add_info_string("IsColocate",
608
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
609
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
10.1k
    return Status::OK();
613
10.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
95.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
95.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
95.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
95.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
95.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
95.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
95.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
95.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
95.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
95.7k
    if constexpr (!is_fake_shared) {
560
95.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
95.7k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
93.9k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
93.9k
            _dependency = _shared_state->create_source_dependency(
576
93.9k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
93.9k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
93.9k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
93.9k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
1.78k
        }
584
95.7k
    }
585
586
95.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
95.7k
    _rows_returned_counter =
591
95.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
95.7k
    _blocks_returned_counter =
593
95.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
95.7k
    _output_block_bytes_counter =
595
95.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
95.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
95.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
95.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
95.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
95.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
95.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
95.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
95.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
95.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
95.7k
    _memory_used_counter =
606
95.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
95.7k
    _common_profile->add_info_string("IsColocate",
608
95.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
95.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
95.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
95.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
95.7k
    return Status::OK();
613
95.7k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
98.7k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
98.7k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
98.7k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
98.7k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
98.7k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
98.7k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
98.7k
    _operator_profile->add_child(_common_profile.get(), true);
557
98.7k
    _operator_profile->add_child(_custom_profile.get(), true);
558
98.7k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
98.7k
    if constexpr (!is_fake_shared) {
560
98.7k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
98.6k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
98.6k
                                    .first.get()
563
98.6k
                                    ->template cast<SharedStateArg>();
564
565
98.6k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
98.6k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
98.6k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
98.6k
        } 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
138
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
138
        }
584
98.7k
    }
585
586
98.7k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
98.7k
    _rows_returned_counter =
591
98.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
98.7k
    _blocks_returned_counter =
593
98.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
98.7k
    _output_block_bytes_counter =
595
98.7k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
98.7k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
98.7k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
98.7k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
98.7k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
98.7k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
98.7k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
98.7k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
98.7k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
98.7k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
98.7k
    _memory_used_counter =
606
98.7k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
98.7k
    _common_profile->add_info_string("IsColocate",
608
98.7k
                                     std::to_string(_parent->is_colocated_operator()));
609
98.7k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
98.7k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
98.7k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
98.7k
    return Status::OK();
613
98.7k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
174
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
174
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
174
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
174
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
174
    _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
174
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
174
    _operator_profile->add_child(_common_profile.get(), true);
557
174
    _operator_profile->add_child(_custom_profile.get(), true);
558
174
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
174
    if constexpr (!is_fake_shared) {
560
174
        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
174
        } 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
174
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
174
            _dependency = _shared_state->create_source_dependency(
576
174
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
174
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
174
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
174
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
0
        }
584
174
    }
585
586
174
    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
174
    _rows_returned_counter =
591
174
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
174
    _blocks_returned_counter =
593
174
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
174
    _output_block_bytes_counter =
595
174
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
174
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
174
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
174
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
174
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
174
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
174
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
174
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
174
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
174
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
174
    _memory_used_counter =
606
174
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
174
    _common_profile->add_info_string("IsColocate",
608
174
                                     std::to_string(_parent->is_colocated_operator()));
609
174
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
174
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
174
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
174
    return Status::OK();
613
174
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
784k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
784k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
784k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
784k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
784k
    _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
784k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
784k
    _operator_profile->add_child(_common_profile.get(), true);
557
784k
    _operator_profile->add_child(_custom_profile.get(), true);
558
784k
    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
784k
    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
784k
    _rows_returned_counter =
591
784k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
784k
    _blocks_returned_counter =
593
784k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
784k
    _output_block_bytes_counter =
595
784k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
784k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
784k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
784k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
784k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
784k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
784k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
784k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
784k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
784k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
784k
    _memory_used_counter =
606
784k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
784k
    _common_profile->add_info_string("IsColocate",
608
784k
                                     std::to_string(_parent->is_colocated_operator()));
609
784k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
784k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
784k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
784k
    return Status::OK();
613
784k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
54.6k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
54.6k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
54.6k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
54.6k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
54.6k
    _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.6k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
54.6k
    _operator_profile->add_child(_common_profile.get(), true);
557
54.6k
    _operator_profile->add_child(_custom_profile.get(), true);
558
54.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
54.6k
    if constexpr (!is_fake_shared) {
560
54.6k
        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.6k
        } 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.52k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
3.52k
            _dependency = _shared_state->create_source_dependency(
576
3.52k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
3.52k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
3.52k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
51.0k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
51.0k
        }
584
54.6k
    }
585
586
54.6k
    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.6k
    _rows_returned_counter =
591
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
54.6k
    _blocks_returned_counter =
593
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
54.6k
    _output_block_bytes_counter =
595
54.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
54.6k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
54.6k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
54.6k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
54.6k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
54.6k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
54.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
54.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
54.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
54.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
54.6k
    _memory_used_counter =
606
54.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
54.6k
    _common_profile->add_info_string("IsColocate",
608
54.6k
                                     std::to_string(_parent->is_colocated_operator()));
609
54.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
54.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
54.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
54.6k
    return Status::OK();
613
54.6k
}
_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.26k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
6.26k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
6.26k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
6.26k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
6.26k
    _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.26k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
6.26k
    _operator_profile->add_child(_common_profile.get(), true);
557
6.26k
    _operator_profile->add_child(_custom_profile.get(), true);
558
6.26k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
6.26k
    if constexpr (!is_fake_shared) {
560
6.26k
        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.26k
        } 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.18k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
6.18k
            _dependency = _shared_state->create_source_dependency(
576
6.18k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
6.18k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
6.18k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
6.18k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
79
        }
584
6.26k
    }
585
586
6.26k
    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.26k
    _rows_returned_counter =
591
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
6.26k
    _blocks_returned_counter =
593
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
6.26k
    _output_block_bytes_counter =
595
6.26k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
6.26k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
6.26k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
6.26k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
6.26k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
6.26k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
6.26k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
6.26k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
6.26k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
6.26k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
6.26k
    _memory_used_counter =
606
6.26k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
6.26k
    _common_profile->add_info_string("IsColocate",
608
6.26k
                                     std::to_string(_parent->is_colocated_operator()));
609
6.26k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
6.26k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
6.26k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
6.26k
    return Status::OK();
613
6.26k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
469
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
469
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
469
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
469
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
469
    _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
469
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
469
    _operator_profile->add_child(_common_profile.get(), true);
557
469
    _operator_profile->add_child(_custom_profile.get(), true);
558
469
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
469
    if constexpr (!is_fake_shared) {
560
469
        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
471
        } 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
471
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
471
            _dependency = _shared_state->create_source_dependency(
576
471
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
471
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
471
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
18.4E
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
18.4E
        }
584
469
    }
585
586
470
    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
469
    _rows_returned_counter =
591
469
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
469
    _blocks_returned_counter =
593
469
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
469
    _output_block_bytes_counter =
595
469
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
469
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
469
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
469
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
469
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
469
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
469
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
469
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
469
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
469
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
469
    _memory_used_counter =
606
469
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
469
    _common_profile->add_info_string("IsColocate",
608
469
                                     std::to_string(_parent->is_colocated_operator()));
609
469
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
469
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
469
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
469
    return Status::OK();
613
469
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
5.28k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
5.28k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
5.28k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
5.28k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
5.28k
    _operator_profile->set_metadata(_parent->node_id());
553
    // indent is false so that source operator will have same
554
    // indentation_level with its parent operator.
555
5.28k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
5.28k
    _operator_profile->add_child(_common_profile.get(), true);
557
5.28k
    _operator_profile->add_child(_custom_profile.get(), true);
558
5.28k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
5.28k
    if constexpr (!is_fake_shared) {
560
5.28k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
0
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
0
                                    .first.get()
563
0
                                    ->template cast<SharedStateArg>();
564
565
0
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
5.28k
        } else if (info.shared_state) {
569
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
                DCHECK(false);
571
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
5.24k
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
5.24k
            _dependency = _shared_state->create_source_dependency(
576
5.24k
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
5.24k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
5.24k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
5.24k
        } else {
580
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
                DCHECK(false);
582
            }
583
38
        }
584
5.28k
    }
585
586
5.28k
    if (must_set_shared_state() && _shared_state == nullptr) {
587
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
588
0
    }
589
590
5.28k
    _rows_returned_counter =
591
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
5.28k
    _blocks_returned_counter =
593
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
5.28k
    _output_block_bytes_counter =
595
5.28k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
5.28k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
5.28k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
5.28k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
5.28k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
5.28k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
5.28k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
5.28k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
5.28k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
5.28k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
5.28k
    _memory_used_counter =
606
5.28k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
5.28k
    _common_profile->add_info_string("IsColocate",
608
5.28k
                                     std::to_string(_parent->is_colocated_operator()));
609
5.28k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
5.28k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
5.28k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
5.28k
    return Status::OK();
613
5.28k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_14LocalStateInfoE
Line
Count
Source
548
621k
Status PipelineXLocalState<SharedStateArg>::init(RuntimeState* state, LocalStateInfo& info) {
549
621k
    _operator_profile.reset(new RuntimeProfile(_parent->get_name() + name_suffix()));
550
621k
    _common_profile.reset(new RuntimeProfile(profile::COMMON_COUNTERS));
551
621k
    _custom_profile.reset(new RuntimeProfile(profile::CUSTOM_COUNTERS));
552
621k
    _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
621k
    info.parent_profile->add_child(_operator_profile.get(), /*indent=*/false);
556
621k
    _operator_profile->add_child(_common_profile.get(), true);
557
621k
    _operator_profile->add_child(_custom_profile.get(), true);
558
621k
    constexpr auto is_fake_shared = std::is_same_v<SharedStateArg, FakeSharedState>;
559
621k
    if constexpr (!is_fake_shared) {
560
621k
        if (info.shared_state_map.find(_parent->operator_id()) != info.shared_state_map.end()) {
561
610k
            _shared_state = info.shared_state_map.at(_parent->operator_id())
562
610k
                                    .first.get()
563
610k
                                    ->template cast<SharedStateArg>();
564
565
610k
            _dependency = _shared_state->get_dep_by_channel_id(info.task_idx).front().get();
566
610k
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
567
610k
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
568
610k
        } else if (info.shared_state) {
569
0
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
570
0
                DCHECK(false);
571
0
            }
572
            // For UnionSourceOperator without children, there is no shared state.
573
0
            _shared_state = info.shared_state->template cast<SharedStateArg>();
574
575
0
            _dependency = _shared_state->create_source_dependency(
576
0
                    _parent->operator_id(), _parent->node_id(), _parent->get_name());
577
0
            _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
578
0
                    _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
579
10.4k
        } else {
580
10.4k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedStateArg>) {
581
10.4k
                DCHECK(false);
582
10.4k
            }
583
10.4k
        }
584
621k
    }
585
586
621k
    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
621k
    _rows_returned_counter =
591
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::ROWS_PRODUCED, TUnit::UNIT, 1);
592
621k
    _blocks_returned_counter =
593
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::BLOCKS_PRODUCED, TUnit::UNIT, 1);
594
621k
    _output_block_bytes_counter =
595
621k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
596
621k
    _max_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
597
621k
            _common_profile, profile::MAX_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
598
621k
    _min_output_block_bytes_counter = ADD_COUNTER_WITH_LEVEL(
599
621k
            _common_profile, profile::MIN_OUTPUT_BLOCK_BYTES, TUnit::BYTES, 1);
600
621k
    _projection_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::PROJECTION_TIME, 2);
601
621k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
602
621k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
603
621k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
604
621k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
605
621k
    _memory_used_counter =
606
621k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
607
621k
    _common_profile->add_info_string("IsColocate",
608
621k
                                     std::to_string(_parent->is_colocated_operator()));
609
621k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
610
621k
    _common_profile->add_info_string("FollowedByShuffledOperator",
611
621k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
612
621k
    return Status::OK();
613
621k
}
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.98M
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
1.98M
    _conjuncts.resize(_parent->_conjuncts.size());
618
2.29M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
308k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
308k
    }
621
1.98M
    if (_parent->has_projection()) {
622
385k
        const auto& projection = *_parent->_projection;
623
385k
        _projections.resize(projection.projections.size());
624
2.37M
        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
385k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
400k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
14.8k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
161k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
146k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
146k
                        state, _intermediate_projections[i][j]));
633
146k
            }
634
14.8k
        }
635
385k
    }
636
1.98M
    return Status::OK();
637
1.98M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
68.7k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
68.7k
    _conjuncts.resize(_parent->_conjuncts.size());
618
69.9k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.19k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.19k
    }
621
68.7k
    if (_parent->has_projection()) {
622
68.7k
        const auto& projection = *_parent->_projection;
623
68.7k
        _projections.resize(projection.projections.size());
624
362k
        for (size_t i = 0; i < _projections.size(); i++) {
625
293k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
293k
        }
627
68.7k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
73.0k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
4.32k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
99.1k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
94.8k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
94.8k
                        state, _intermediate_projections[i][j]));
633
94.8k
            }
634
4.32k
        }
635
68.7k
    }
636
68.7k
    return Status::OK();
637
68.7k
}
_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
225k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
225k
    _conjuncts.resize(_parent->_conjuncts.size());
618
225k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
225k
    if (_parent->has_projection()) {
622
80
        const auto& projection = *_parent->_projection;
623
80
        _projections.resize(projection.projections.size());
624
402
        for (size_t i = 0; i < _projections.size(); i++) {
625
322
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
322
        }
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
225k
    return Status::OK();
637
225k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
37
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
37
    _conjuncts.resize(_parent->_conjuncts.size());
618
37
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
37
    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
37
    return Status::OK();
637
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.86k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.86k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.94k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
75
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
75
    }
621
5.87k
    if (_parent->has_projection()) {
622
5.87k
        const auto& projection = *_parent->_projection;
623
5.87k
        _projections.resize(projection.projections.size());
624
27.8k
        for (size_t i = 0; i < _projections.size(); i++) {
625
21.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
21.9k
        }
627
5.87k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.89k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
29
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
198
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
169
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
169
                        state, _intermediate_projections[i][j]));
633
169
            }
634
29
        }
635
5.87k
    }
636
5.86k
    return Status::OK();
637
5.86k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
10.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
10.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
11.1k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
936
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
936
    }
621
10.1k
    if (_parent->has_projection()) {
622
5.31k
        const auto& projection = *_parent->_projection;
623
5.31k
        _projections.resize(projection.projections.size());
624
22.2k
        for (size_t i = 0; i < _projections.size(); i++) {
625
16.9k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
16.9k
        }
627
5.31k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
5.42k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
113
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
876
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
763
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
763
                        state, _intermediate_projections[i][j]));
633
763
            }
634
113
        }
635
5.31k
    }
636
10.1k
    return Status::OK();
637
10.1k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
96.1k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
96.1k
    _conjuncts.resize(_parent->_conjuncts.size());
618
97.5k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
1.40k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
1.40k
    }
621
96.1k
    if (_parent->has_projection()) {
622
29.9k
        const auto& projection = *_parent->_projection;
623
29.9k
        _projections.resize(projection.projections.size());
624
275k
        for (size_t i = 0; i < _projections.size(); i++) {
625
245k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
245k
        }
627
29.9k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
30.1k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
162
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.03k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
876
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
876
                        state, _intermediate_projections[i][j]));
633
876
            }
634
162
        }
635
29.9k
    }
636
96.1k
    return Status::OK();
637
96.1k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
98.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
98.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
98.8k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
49
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
49
    }
621
98.8k
    if (_parent->has_projection()) {
622
200
        const auto& projection = *_parent->_projection;
623
200
        _projections.resize(projection.projections.size());
624
751
        for (size_t i = 0; i < _projections.size(); i++) {
625
551
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
551
        }
627
200
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
202
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
2
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
9
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
9
                        state, _intermediate_projections[i][j]));
633
9
            }
634
2
        }
635
200
    }
636
98.8k
    return Status::OK();
637
98.8k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
178
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
178
    _conjuncts.resize(_parent->_conjuncts.size());
618
178
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
178
    if (_parent->has_projection()) {
622
148
        const auto& projection = *_parent->_projection;
623
148
        _projections.resize(projection.projections.size());
624
444
        for (size_t i = 0; i < _projections.size(); i++) {
625
296
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
296
        }
627
148
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
148
        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
148
    }
636
178
    return Status::OK();
637
178
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
790k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
790k
    _conjuncts.resize(_parent->_conjuncts.size());
618
1.09M
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
304k
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
304k
    }
621
790k
    if (_parent->has_projection()) {
622
263k
        const auto& projection = *_parent->_projection;
623
263k
        _projections.resize(projection.projections.size());
624
1.57M
        for (size_t i = 0; i < _projections.size(); i++) {
625
1.31M
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
1.31M
        }
627
263k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
273k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
10.0k
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
58.3k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
48.2k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
48.2k
                        state, _intermediate_projections[i][j]));
633
48.2k
            }
634
10.0k
        }
635
263k
    }
636
790k
    return Status::OK();
637
790k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
54.8k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
54.8k
    _conjuncts.resize(_parent->_conjuncts.size());
618
54.8k
    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.8k
    if (_parent->has_projection()) {
622
11.4k
        const auto& projection = *_parent->_projection;
623
11.4k
        _projections.resize(projection.projections.size());
624
110k
        for (size_t i = 0; i < _projections.size(); i++) {
625
99.4k
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
99.4k
        }
627
11.4k
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
11.5k
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
99
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
1.62k
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
1.52k
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
1.52k
                        state, _intermediate_projections[i][j]));
633
1.52k
            }
634
99
        }
635
11.4k
    }
636
54.8k
    return Status::OK();
637
54.8k
}
_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.24k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
6.24k
    _conjuncts.resize(_parent->_conjuncts.size());
618
6.97k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
729
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
729
    }
621
6.24k
    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.24k
    return Status::OK();
637
6.24k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
471
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
471
    _conjuncts.resize(_parent->_conjuncts.size());
618
471
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
471
    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
471
    return Status::OK();
637
471
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
5.28k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
5.28k
    _conjuncts.resize(_parent->_conjuncts.size());
618
5.28k
    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.28k
    if (_parent->has_projection()) {
622
60
        const auto& projection = *_parent->_projection;
623
60
        _projections.resize(projection.projections.size());
624
228
        for (size_t i = 0; i < _projections.size(); i++) {
625
168
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
168
        }
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.28k
    return Status::OK();
637
5.28k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
627k
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
627k
    _conjuncts.resize(_parent->_conjuncts.size());
618
627k
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
0
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
0
    }
621
627k
    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
627k
    return Status::OK();
637
627k
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE4openEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE4openEPNS_12RuntimeStateE
Line
Count
Source
616
169
Status PipelineXLocalState<SharedStateArg>::open(RuntimeState* state) {
617
169
    _conjuncts.resize(_parent->_conjuncts.size());
618
176
    for (size_t i = 0; i < _conjuncts.size(); i++) {
619
7
        RETURN_IF_ERROR(_parent->_conjuncts[i]->clone(state, _conjuncts[i]));
620
7
    }
621
169
    if (_parent->has_projection()) {
622
166
        const auto& projection = *_parent->_projection;
623
166
        _projections.resize(projection.projections.size());
624
491
        for (size_t i = 0; i < _projections.size(); i++) {
625
325
            RETURN_IF_ERROR(projection.projections[i]->clone(state, _projections[i]));
626
325
        }
627
166
        _intermediate_projections.resize(projection.intermediate_projections.size());
628
169
        for (int i = 0; i < projection.intermediate_projections.size(); i++) {
629
3
            _intermediate_projections[i].resize(projection.intermediate_projections[i].size());
630
11
            for (int j = 0; j < projection.intermediate_projections[i].size(); j++) {
631
8
                RETURN_IF_ERROR(projection.intermediate_projections[i][j]->clone(
632
8
                        state, _intermediate_projections[i][j]));
633
8
            }
634
3
        }
635
166
    }
636
169
    return Status::OK();
637
169
}
638
639
template <typename SharedStateArg>
640
8.00k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
8.00k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
8.00k
    _terminated = true;
645
8.00k
    return Status::OK();
646
8.00k
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
529
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
529
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
529
    _terminated = true;
645
529
    return Status::OK();
646
529
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15SortSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
32
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
32
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
32
    _terminated = true;
645
32
    return Status::OK();
646
32
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
188
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
188
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
188
    _terminated = true;
645
188
    return Status::OK();
646
188
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE9terminateEPNS_12RuntimeStateE
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
6.16k
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
6.16k
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
6.16k
    _terminated = true;
645
6.16k
    return Status::OK();
646
6.16k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE9terminateEPNS_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
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
5
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
5
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
5
    _terminated = true;
645
5
    return Status::OK();
646
5
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
70
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
70
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
70
    _terminated = true;
645
70
    return Status::OK();
646
70
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE9terminateEPNS_12RuntimeStateE
Line
Count
Source
640
904
Status PipelineXLocalState<SharedStateArg>::terminate(RuntimeState* state) {
641
904
    if (_terminated) {
642
0
        return Status::OK();
643
0
    }
644
904
    _terminated = true;
645
904
    return Status::OK();
646
904
}
Unexecuted instantiation: _ZN5doris19PipelineXLocalStateINS_16BasicSharedStateEE9terminateEPNS_12RuntimeStateE
_ZN5doris19PipelineXLocalStateINS_17RecCTESharedStateEE9terminateEPNS_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
}
647
648
template <typename SharedStateArg>
649
2.24M
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
2.24M
    if (_closed) {
651
256k
        return Status::OK();
652
256k
    }
653
1.98M
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
1.19M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
1.19M
    }
656
1.98M
    _closed = true;
657
1.98M
    return Status::OK();
658
2.24M
}
_ZN5doris19PipelineXLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
68.6k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
68.6k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
68.6k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
68.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
68.6k
    }
656
68.6k
    _closed = true;
657
68.6k
    return Status::OK();
658
68.6k
}
_ZN5doris19PipelineXLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
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
446k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
446k
    if (_closed) {
651
223k
        return Status::OK();
652
223k
    }
653
222k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
222k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
222k
    }
656
222k
    _closed = true;
657
222k
    return Status::OK();
658
446k
}
_ZN5doris19PipelineXLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
37
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
37
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
37
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
37
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
37
    }
656
37
    _closed = true;
657
37
    return Status::OK();
658
37
}
_ZN5doris19PipelineXLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
5.86k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
5.86k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
5.86k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.86k
    }
656
5.86k
    _closed = true;
657
5.86k
    return Status::OK();
658
5.86k
}
_ZN5doris19PipelineXLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
20.4k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
20.4k
    if (_closed) {
651
10.2k
        return Status::OK();
652
10.2k
    }
653
10.1k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
10.1k
    }
656
10.1k
    _closed = true;
657
10.1k
    return Status::OK();
658
20.4k
}
_ZN5doris19PipelineXLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
95.9k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
95.9k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
95.9k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
95.9k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
95.9k
    }
656
95.9k
    _closed = true;
657
95.9k
    return Status::OK();
658
95.9k
}
_ZN5doris19PipelineXLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
98.5k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
98.5k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
98.5k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
98.5k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
98.5k
    }
656
98.5k
    _closed = true;
657
98.5k
    return Status::OK();
658
98.5k
}
_ZN5doris19PipelineXLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
173
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
173
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
173
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
173
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
173
    }
656
173
    _closed = true;
657
173
    return Status::OK();
658
173
}
_ZN5doris19PipelineXLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
807k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
807k
    if (_closed) {
651
16.1k
        return Status::OK();
652
16.1k
    }
653
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
    }
656
791k
    _closed = true;
657
791k
    return Status::OK();
658
807k
}
_ZN5doris19PipelineXLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
54.8k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
54.8k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
54.8k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
54.8k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
54.8k
    }
656
54.8k
    _closed = true;
657
54.8k
    return Status::OK();
658
54.8k
}
_ZN5doris19PipelineXLocalStateINS_20DataQueueSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
27
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
27
    if (_closed) {
651
14
        return Status::OK();
652
14
    }
653
13
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
13
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
13
    }
656
13
    _closed = true;
657
13
    return Status::OK();
658
27
}
_ZN5doris19PipelineXLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
6.22k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
6.22k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
6.22k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
6.22k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
6.22k
    }
656
6.22k
    _closed = true;
657
6.22k
    return Status::OK();
658
6.22k
}
_ZN5doris19PipelineXLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
736
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
736
    if (_closed) {
651
369
        return Status::OK();
652
369
    }
653
367
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
367
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
367
    }
656
367
    _closed = true;
657
367
    return Status::OK();
658
736
}
_ZN5doris19PipelineXLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
11.0k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
11.0k
    if (_closed) {
651
5.77k
        return Status::OK();
652
5.77k
    }
653
5.27k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
5.27k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
5.27k
    }
656
5.27k
    _closed = true;
657
5.27k
    return Status::OK();
658
11.0k
}
_ZN5doris19PipelineXLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateE
Line
Count
Source
649
628k
Status PipelineXLocalState<SharedStateArg>::close(RuntimeState* state) {
650
628k
    if (_closed) {
651
0
        return Status::OK();
652
0
    }
653
628k
    if constexpr (!std::is_same_v<SharedStateArg, FakeSharedState>) {
654
628k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
655
628k
    }
656
628k
    _closed = true;
657
628k
    return Status::OK();
658
628k
}
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.71M
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
1.71M
    _operator_profile =
664
1.71M
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
1.71M
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
1.71M
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
1.71M
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
1.71M
    _operator_profile->add_child(_common_profile, true);
673
1.71M
    _operator_profile->add_child(_custom_profile, true);
674
675
1.71M
    _operator_profile->set_metadata(_parent->node_id());
676
1.71M
    _wait_for_finish_dependency_timer =
677
1.71M
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
1.71M
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
1.71M
    if constexpr (!is_fake_shared) {
680
1.23M
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
1.23M
            info.shared_state_map.end()) {
682
345k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
230k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
230k
            }
685
345k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
345k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
345k
                                                  ? 0
688
345k
                                                  : info.task_idx]
689
345k
                                  .get();
690
345k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
887k
        } else {
692
887k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
90
                DCHECK(false);
694
90
            }
695
887k
            _shared_state = info.shared_state->template cast<SharedState>();
696
887k
            _dependency = _shared_state->create_sink_dependency(
697
887k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
887k
        }
699
1.23M
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
1.23M
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
1.23M
    }
702
703
1.71M
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
1.71M
    _rows_input_counter =
708
1.71M
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
1.71M
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
1.71M
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
1.71M
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
1.71M
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
1.71M
    _memory_used_counter =
714
1.71M
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
1.71M
    _common_profile->add_info_string("IsColocate",
716
1.71M
                                     std::to_string(_parent->is_colocated_operator()));
717
1.71M
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
1.71M
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
1.71M
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
1.71M
    return Status::OK();
721
1.71M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
116k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
116k
    _operator_profile =
664
116k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
116k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
116k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
116k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
116k
    _operator_profile->add_child(_common_profile, true);
673
116k
    _operator_profile->add_child(_custom_profile, true);
674
675
116k
    _operator_profile->set_metadata(_parent->node_id());
676
116k
    _wait_for_finish_dependency_timer =
677
116k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
116k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
116k
    if constexpr (!is_fake_shared) {
680
116k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
116k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
15.8k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
15.8k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
15.8k
                                                  ? 0
688
15.8k
                                                  : info.task_idx]
689
15.8k
                                  .get();
690
15.8k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
100k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
100k
            _shared_state = info.shared_state->template cast<SharedState>();
696
100k
            _dependency = _shared_state->create_sink_dependency(
697
100k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
100k
        }
699
116k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
116k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
116k
    }
702
703
116k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
116k
    _rows_input_counter =
708
116k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
116k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
116k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
116k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
116k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
116k
    _memory_used_counter =
714
116k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
116k
    _common_profile->add_info_string("IsColocate",
716
116k
                                     std::to_string(_parent->is_colocated_operator()));
717
116k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
116k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
116k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
116k
    return Status::OK();
721
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
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
223k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
223k
    _operator_profile =
664
223k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
223k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
223k
    _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
223k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
223k
    _operator_profile->add_child(_common_profile, true);
673
223k
    _operator_profile->add_child(_custom_profile, true);
674
675
223k
    _operator_profile->set_metadata(_parent->node_id());
676
223k
    _wait_for_finish_dependency_timer =
677
223k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
223k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
223k
    if constexpr (!is_fake_shared) {
680
223k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
223k
            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
223k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
223k
            _shared_state = info.shared_state->template cast<SharedState>();
696
223k
            _dependency = _shared_state->create_sink_dependency(
697
223k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
223k
        }
699
223k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
223k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
223k
    }
702
703
223k
    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
223k
    _rows_input_counter =
708
223k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
223k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
223k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
223k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
223k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
223k
    _memory_used_counter =
714
223k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
223k
    _common_profile->add_info_string("IsColocate",
716
223k
                                     std::to_string(_parent->is_colocated_operator()));
717
223k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
223k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
223k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
223k
    return Status::OK();
721
223k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
44
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
44
    _operator_profile =
664
44
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
44
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
44
    _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
44
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
44
    _operator_profile->add_child(_common_profile, true);
673
44
    _operator_profile->add_child(_custom_profile, true);
674
675
44
    _operator_profile->set_metadata(_parent->node_id());
676
44
    _wait_for_finish_dependency_timer =
677
44
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
44
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
44
    if constexpr (!is_fake_shared) {
680
44
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
44
            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
44
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
44
            _shared_state = info.shared_state->template cast<SharedState>();
696
44
            _dependency = _shared_state->create_sink_dependency(
697
44
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
44
        }
699
44
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
44
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
44
    }
702
703
44
    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
44
    _rows_input_counter =
708
44
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
44
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
44
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
44
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
44
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
44
    _memory_used_counter =
714
44
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
44
    _common_profile->add_info_string("IsColocate",
716
44
                                     std::to_string(_parent->is_colocated_operator()));
717
44
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
44
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
44
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
44
    return Status::OK();
721
44
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
5.87k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
5.87k
    _operator_profile =
664
5.87k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
5.87k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
5.87k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
5.87k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
5.87k
    _operator_profile->add_child(_common_profile, true);
673
5.87k
    _operator_profile->add_child(_custom_profile, true);
674
675
5.87k
    _operator_profile->set_metadata(_parent->node_id());
676
5.87k
    _wait_for_finish_dependency_timer =
677
5.87k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
5.87k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
5.87k
    if constexpr (!is_fake_shared) {
680
5.87k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
5.87k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
5.87k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
5.87k
            _shared_state = info.shared_state->template cast<SharedState>();
696
5.87k
            _dependency = _shared_state->create_sink_dependency(
697
5.87k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
5.87k
        }
699
5.87k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
5.87k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
5.87k
    }
702
703
5.87k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
5.87k
    _rows_input_counter =
708
5.87k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
5.87k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
5.87k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
5.87k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
5.87k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
5.87k
    _memory_used_counter =
714
5.87k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
5.87k
    _common_profile->add_info_string("IsColocate",
716
5.87k
                                     std::to_string(_parent->is_colocated_operator()));
717
5.87k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
5.87k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
5.87k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
5.87k
    return Status::OK();
721
5.87k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
10.1k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
10.1k
    _operator_profile =
664
10.1k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
10.1k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
10.1k
    _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
10.1k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
10.1k
    _operator_profile->add_child(_common_profile, true);
673
10.1k
    _operator_profile->add_child(_custom_profile, true);
674
675
10.1k
    _operator_profile->set_metadata(_parent->node_id());
676
10.1k
    _wait_for_finish_dependency_timer =
677
10.1k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
10.1k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
10.1k
    if constexpr (!is_fake_shared) {
680
10.1k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
10.1k
            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
10.1k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
10.1k
            _shared_state = info.shared_state->template cast<SharedState>();
696
10.1k
            _dependency = _shared_state->create_sink_dependency(
697
10.1k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
10.1k
        }
699
10.1k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
10.1k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
10.1k
    }
702
703
10.1k
    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
10.1k
    _rows_input_counter =
708
10.1k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
10.1k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
10.1k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
10.1k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
10.1k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
10.1k
    _memory_used_counter =
714
10.1k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
10.1k
    _common_profile->add_info_string("IsColocate",
716
10.1k
                                     std::to_string(_parent->is_colocated_operator()));
717
10.1k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
10.1k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
10.1k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
10.1k
    return Status::OK();
721
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
95.9k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
95.9k
    _operator_profile =
664
95.9k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
95.9k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
95.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
95.9k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
95.9k
    _operator_profile->add_child(_common_profile, true);
673
95.9k
    _operator_profile->add_child(_custom_profile, true);
674
675
95.9k
    _operator_profile->set_metadata(_parent->node_id());
676
95.9k
    _wait_for_finish_dependency_timer =
677
95.9k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
95.9k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
95.9k
    if constexpr (!is_fake_shared) {
680
95.9k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
95.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
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
95.9k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
95.9k
            _shared_state = info.shared_state->template cast<SharedState>();
696
95.9k
            _dependency = _shared_state->create_sink_dependency(
697
95.9k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
95.9k
        }
699
95.9k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
95.9k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
95.9k
    }
702
703
95.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
95.9k
    _rows_input_counter =
708
95.9k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
95.9k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
95.9k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
95.9k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
95.9k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
95.9k
    _memory_used_counter =
714
95.9k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
95.9k
    _common_profile->add_info_string("IsColocate",
716
95.9k
                                     std::to_string(_parent->is_colocated_operator()));
717
95.9k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
95.9k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
95.9k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
95.9k
    return Status::OK();
721
95.9k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
98.6k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
98.6k
    _operator_profile =
664
98.6k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
98.6k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
98.6k
    _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
98.6k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
98.6k
    _operator_profile->add_child(_common_profile, true);
673
98.6k
    _operator_profile->add_child(_custom_profile, true);
674
675
98.6k
    _operator_profile->set_metadata(_parent->node_id());
676
98.6k
    _wait_for_finish_dependency_timer =
677
98.6k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
98.6k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
98.6k
    if constexpr (!is_fake_shared) {
680
98.6k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
98.7k
            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
98.7k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
98.7k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
98.7k
                                                  ? 0
688
98.7k
                                                  : info.task_idx]
689
98.7k
                                  .get();
690
98.7k
            _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
98.6k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
98.6k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
98.6k
    }
702
703
98.6k
    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
98.6k
    _rows_input_counter =
708
98.6k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
98.6k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
98.6k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
98.6k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
98.6k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
98.6k
    _memory_used_counter =
714
98.6k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
98.6k
    _common_profile->add_info_string("IsColocate",
716
98.6k
                                     std::to_string(_parent->is_colocated_operator()));
717
98.6k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
98.6k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
98.6k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
98.6k
    return Status::OK();
721
98.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
184
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
184
    _operator_profile =
664
184
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
184
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
184
    _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
184
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
184
    _operator_profile->add_child(_common_profile, true);
673
184
    _operator_profile->add_child(_custom_profile, true);
674
675
184
    _operator_profile->set_metadata(_parent->node_id());
676
184
    _wait_for_finish_dependency_timer =
677
184
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
184
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
184
    if constexpr (!is_fake_shared) {
680
184
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
184
            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
184
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
184
            _shared_state = info.shared_state->template cast<SharedState>();
696
184
            _dependency = _shared_state->create_sink_dependency(
697
184
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
184
        }
699
184
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
184
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
184
    }
702
703
184
    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
184
    _rows_input_counter =
708
184
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
184
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
184
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
184
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
184
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
184
    _memory_used_counter =
714
184
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
184
    _common_profile->add_info_string("IsColocate",
716
184
                                     std::to_string(_parent->is_colocated_operator()));
717
184
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
184
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
184
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
184
    return Status::OK();
721
184
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
484k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
484k
    _operator_profile =
664
484k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
484k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
484k
    _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
484k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
484k
    _operator_profile->add_child(_common_profile, true);
673
484k
    _operator_profile->add_child(_custom_profile, true);
674
675
484k
    _operator_profile->set_metadata(_parent->node_id());
676
484k
    _wait_for_finish_dependency_timer =
677
484k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
484k
    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
484k
    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
484k
    _rows_input_counter =
708
484k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
484k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
484k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
484k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
484k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
484k
    _memory_used_counter =
714
484k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
484k
    _common_profile->add_info_string("IsColocate",
716
484k
                                     std::to_string(_parent->is_colocated_operator()));
717
484k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
484k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
484k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
484k
    return Status::OK();
721
484k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
7.97k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
7.97k
    _operator_profile =
664
7.97k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
7.97k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
7.97k
    _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
7.97k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
7.97k
    _operator_profile->add_child(_common_profile, true);
673
7.97k
    _operator_profile->add_child(_custom_profile, true);
674
675
7.97k
    _operator_profile->set_metadata(_parent->node_id());
676
7.97k
    _wait_for_finish_dependency_timer =
677
7.97k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
7.97k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
7.97k
    if constexpr (!is_fake_shared) {
680
7.97k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
7.97k
            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
7.97k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
7.97k
            _shared_state = info.shared_state->template cast<SharedState>();
696
7.97k
            _dependency = _shared_state->create_sink_dependency(
697
7.97k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
7.97k
        }
699
7.97k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
7.97k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
7.97k
    }
702
703
7.97k
    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
7.97k
    _rows_input_counter =
708
7.97k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
7.97k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
7.97k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
7.97k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
7.97k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
7.97k
    _memory_used_counter =
714
7.97k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
7.97k
    _common_profile->add_info_string("IsColocate",
716
7.97k
                                     std::to_string(_parent->is_colocated_operator()));
717
7.97k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
7.97k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
7.97k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
7.97k
    return Status::OK();
721
7.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
471
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
471
    _operator_profile =
664
471
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
471
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
471
    _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
471
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
471
    _operator_profile->add_child(_common_profile, true);
673
471
    _operator_profile->add_child(_custom_profile, true);
674
675
471
    _operator_profile->set_metadata(_parent->node_id());
676
471
    _wait_for_finish_dependency_timer =
677
471
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
471
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
471
    if constexpr (!is_fake_shared) {
680
471
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
471
            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
471
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
471
            _shared_state = info.shared_state->template cast<SharedState>();
696
471
            _dependency = _shared_state->create_sink_dependency(
697
471
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
471
        }
699
471
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
471
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
471
    }
702
703
471
    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
471
    _rows_input_counter =
708
471
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
471
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
471
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
471
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
471
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
471
    _memory_used_counter =
714
471
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
471
    _common_profile->add_info_string("IsColocate",
716
471
                                     std::to_string(_parent->is_colocated_operator()));
717
471
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
471
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
471
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
471
    return Status::OK();
721
471
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
2.31k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
2.31k
    _operator_profile =
664
2.31k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
2.31k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
2.31k
    _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.31k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
2.31k
    _operator_profile->add_child(_common_profile, true);
673
2.31k
    _operator_profile->add_child(_custom_profile, true);
674
675
2.31k
    _operator_profile->set_metadata(_parent->node_id());
676
2.31k
    _wait_for_finish_dependency_timer =
677
2.31k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
2.31k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
2.31k
    if constexpr (!is_fake_shared) {
680
2.31k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
2.31k
            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.31k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
2.31k
            _shared_state = info.shared_state->template cast<SharedState>();
696
2.31k
            _dependency = _shared_state->create_sink_dependency(
697
2.31k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
2.31k
        }
699
2.31k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
2.31k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
2.31k
    }
702
703
2.31k
    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.31k
    _rows_input_counter =
708
2.31k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
2.31k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
2.31k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
2.31k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
2.31k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
2.31k
    _memory_used_counter =
714
2.31k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
2.31k
    _common_profile->add_info_string("IsColocate",
716
2.31k
                                     std::to_string(_parent->is_colocated_operator()));
717
2.31k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
2.31k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
2.31k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
2.31k
    return Status::OK();
721
2.31k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
13.0k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
13.0k
    _operator_profile =
664
13.0k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
13.0k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
13.0k
    _custom_profile = state->obj_pool()->add(new RuntimeProfile(profile::CUSTOM_COUNTERS));
667
668
    // indentation is true
669
    // The parent profile of sink operator is usually a RuntimeProfile called PipelineTask.
670
    // So we should set the indentation to true.
671
13.0k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
13.0k
    _operator_profile->add_child(_common_profile, true);
673
13.0k
    _operator_profile->add_child(_custom_profile, true);
674
675
13.0k
    _operator_profile->set_metadata(_parent->node_id());
676
13.0k
    _wait_for_finish_dependency_timer =
677
13.0k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
13.0k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
13.0k
    if constexpr (!is_fake_shared) {
680
13.0k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
13.0k
            info.shared_state_map.end()) {
682
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
            }
685
0
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
0
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
0
                                                  ? 0
688
0
                                                  : info.task_idx]
689
0
                                  .get();
690
0
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
13.0k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
13.0k
            _shared_state = info.shared_state->template cast<SharedState>();
696
13.0k
            _dependency = _shared_state->create_sink_dependency(
697
13.0k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
13.0k
        }
699
13.0k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
13.0k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
13.0k
    }
702
703
13.0k
    if (must_set_shared_state() && _shared_state == nullptr) {
704
0
        return Status::InternalError("must set shared state, in {}", _parent->get_name());
705
0
    }
706
707
13.0k
    _rows_input_counter =
708
13.0k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
13.0k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
13.0k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
13.0k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
13.0k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
13.0k
    _memory_used_counter =
714
13.0k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
13.0k
    _common_profile->add_info_string("IsColocate",
716
13.0k
                                     std::to_string(_parent->is_colocated_operator()));
717
13.0k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
13.0k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
13.0k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
13.0k
    return Status::OK();
721
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
230k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
230k
    _operator_profile =
664
230k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
230k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
230k
    _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
230k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
230k
    _operator_profile->add_child(_common_profile, true);
673
230k
    _operator_profile->add_child(_custom_profile, true);
674
675
230k
    _operator_profile->set_metadata(_parent->node_id());
676
230k
    _wait_for_finish_dependency_timer =
677
230k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
230k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
230k
    if constexpr (!is_fake_shared) {
680
230k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
230k
            info.shared_state_map.end()) {
682
230k
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
683
230k
                DCHECK(info.shared_state_map.at(_parent->dests_id().front()).second.size() == 1);
684
230k
            }
685
230k
            _dependency = info.shared_state_map.at(_parent->dests_id().front())
686
230k
                                  .second[std::is_same_v<LocalExchangeSharedState, SharedState>
687
230k
                                                  ? 0
688
230k
                                                  : info.task_idx]
689
230k
                                  .get();
690
230k
            _shared_state = _dependency->shared_state()->template cast<SharedState>();
691
230k
        } else {
692
90
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
90
                DCHECK(false);
694
90
            }
695
90
            _shared_state = info.shared_state->template cast<SharedState>();
696
90
            _dependency = _shared_state->create_sink_dependency(
697
90
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
90
        }
699
230k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
230k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
230k
    }
702
703
230k
    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
230k
    _rows_input_counter =
708
230k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
230k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
230k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
230k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
230k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
230k
    _memory_used_counter =
714
230k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
230k
    _common_profile->add_info_string("IsColocate",
716
230k
                                     std::to_string(_parent->is_colocated_operator()));
717
230k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
230k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
230k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
230k
    return Status::OK();
721
230k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
661
426k
Status PipelineXSinkLocalState<SharedState>::init(RuntimeState* state, LocalSinkStateInfo& info) {
662
    // create profile
663
426k
    _operator_profile =
664
426k
            state->obj_pool()->add(new RuntimeProfile(_parent->get_name() + name_suffix()));
665
426k
    _common_profile = state->obj_pool()->add(new RuntimeProfile(profile::COMMON_COUNTERS));
666
426k
    _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
426k
    info.parent_profile->add_child(_operator_profile, /*indent=*/true);
672
426k
    _operator_profile->add_child(_common_profile, true);
673
426k
    _operator_profile->add_child(_custom_profile, true);
674
675
426k
    _operator_profile->set_metadata(_parent->node_id());
676
426k
    _wait_for_finish_dependency_timer =
677
426k
            ADD_TIMER(_common_profile, profile::PENDING_FINISH_DEPENDENCY);
678
426k
    constexpr auto is_fake_shared = std::is_same_v<SharedState, FakeSharedState>;
679
426k
    if constexpr (!is_fake_shared) {
680
426k
        if (info.shared_state_map.find(_parent->dests_id().front()) !=
681
426k
            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
426k
        } else {
692
            if constexpr (std::is_same_v<LocalExchangeSharedState, SharedState>) {
693
                DCHECK(false);
694
            }
695
426k
            _shared_state = info.shared_state->template cast<SharedState>();
696
426k
            _dependency = _shared_state->create_sink_dependency(
697
426k
                    _parent->dests_id().front(), _parent->node_id(), _parent->get_name());
698
426k
        }
699
426k
        _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
700
426k
                _common_profile, "WaitForDependency[" + _dependency->name() + "]Time", 1);
701
426k
    }
702
703
426k
    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
426k
    _rows_input_counter =
708
426k
            ADD_COUNTER_WITH_LEVEL(_common_profile, profile::INPUT_ROWS, TUnit::UNIT, 1);
709
426k
    _init_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::INIT_TIME, 2);
710
426k
    _open_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::OPEN_TIME, 2);
711
426k
    _close_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::CLOSE_TIME, 2);
712
426k
    _exec_timer = ADD_TIMER_WITH_LEVEL(_common_profile, profile::EXEC_TIME, 1);
713
426k
    _memory_used_counter =
714
426k
            _common_profile->AddHighWaterMarkCounter(profile::MEMORY_USAGE, TUnit::BYTES, "", 1);
715
426k
    _common_profile->add_info_string("IsColocate",
716
426k
                                     std::to_string(_parent->is_colocated_operator()));
717
426k
    _common_profile->add_info_string("IsShuffled", std::to_string(_parent->is_shuffled_operator()));
718
426k
    _common_profile->add_info_string("FollowedByShuffledOperator",
719
426k
                                     std::to_string(_parent->followed_by_shuffled_operator()));
720
426k
    return Status::OK();
721
426k
}
_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.72M
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
1.72M
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
1.72M
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
1.23M
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
1.23M
    }
731
1.72M
    _closed = true;
732
1.72M
    return Status::OK();
733
1.72M
}
_ZN5doris23PipelineXSinkLocalStateINS_19HashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
116k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
116k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
116k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
116k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
116k
    }
731
116k
    _closed = true;
732
116k
    return Status::OK();
733
116k
}
_ZN5doris23PipelineXSinkLocalStateINS_30PartitionedHashJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
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
223k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
223k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
223k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
223k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
223k
    }
731
223k
    _closed = true;
732
223k
    return Status::OK();
733
223k
}
_ZN5doris23PipelineXSinkLocalStateINS_20SpillSortSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
35
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
35
    if (_closed) {
726
2
        return Status::OK();
727
2
    }
728
33
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
33
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
33
    }
731
33
    _closed = true;
732
33
    return Status::OK();
733
35
}
_ZN5doris23PipelineXSinkLocalStateINS_25NestedLoopJoinSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
5.86k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
5.86k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
5.86k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
5.86k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
5.86k
    }
731
5.86k
    _closed = true;
732
5.86k
    return Status::OK();
733
5.86k
}
_ZN5doris23PipelineXSinkLocalStateINS_19AnalyticSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
10.1k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
10.1k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
10.1k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
10.1k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
10.1k
    }
731
10.1k
    _closed = true;
732
10.1k
    return Status::OK();
733
10.1k
}
_ZN5doris23PipelineXSinkLocalStateINS_14AggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
95.6k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
95.6k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
95.6k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
95.6k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
95.6k
    }
731
95.6k
    _closed = true;
732
95.6k
    return Status::OK();
733
95.6k
}
_ZN5doris23PipelineXSinkLocalStateINS_22BucketedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
98.3k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
98.3k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
98.3k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
98.3k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
98.3k
    }
731
98.3k
    _closed = true;
732
98.3k
    return Status::OK();
733
98.3k
}
_ZN5doris23PipelineXSinkLocalStateINS_25PartitionedAggSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
173
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
173
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
173
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
173
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
173
    }
731
173
    _closed = true;
732
173
    return Status::OK();
733
173
}
_ZN5doris23PipelineXSinkLocalStateINS_15FakeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
490k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
490k
    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
490k
    _closed = true;
732
490k
    return Status::OK();
733
490k
}
_ZN5doris23PipelineXSinkLocalStateINS_16UnionSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
7.97k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
7.97k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
7.97k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
7.97k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
7.97k
    }
731
7.97k
    _closed = true;
732
7.97k
    return Status::OK();
733
7.97k
}
_ZN5doris23PipelineXSinkLocalStateINS_28PartitionSortNodeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
367
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
367
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
367
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
367
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
367
    }
731
367
    _closed = true;
732
367
    return Status::OK();
733
367
}
_ZN5doris23PipelineXSinkLocalStateINS_20MultiCastSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
2.32k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
2.32k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
2.32k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
2.32k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
2.32k
    }
731
2.32k
    _closed = true;
732
2.32k
    return Status::OK();
733
2.32k
}
_ZN5doris23PipelineXSinkLocalStateINS_14SetSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
13.0k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
13.0k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
13.0k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
13.0k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
13.0k
    }
731
13.0k
    _closed = true;
732
13.0k
    return Status::OK();
733
13.0k
}
_ZN5doris23PipelineXSinkLocalStateINS_24LocalExchangeSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
231k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
231k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
231k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
231k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
231k
    }
731
231k
    _closed = true;
732
231k
    return Status::OK();
733
231k
}
_ZN5doris23PipelineXSinkLocalStateINS_16BasicSharedStateEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
724
427k
Status PipelineXSinkLocalState<SharedState>::close(RuntimeState* state, Status exec_status) {
725
427k
    if (_closed) {
726
0
        return Status::OK();
727
0
    }
728
427k
    if constexpr (!std::is_same_v<SharedState, FakeSharedState>) {
729
427k
        COUNTER_SET(_wait_for_dependency_timer, _dependency->watcher_elapse_time());
730
427k
    }
731
427k
    _closed = true;
732
427k
    return Status::OK();
733
427k
}
_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.84k
                                                          bool* eos) {
738
8.84k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.83k
    return pull(state, block, eos);
740
8.84k
}
_ZN5doris18StreamingOperatorXINS_23AssertNumRowsLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
38
                                                          bool* eos) {
738
38
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
38
    return pull(state, block, eos);
740
38
}
_ZN5doris18StreamingOperatorXINS_16SelectLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
737
8.80k
                                                          bool* eos) {
738
8.80k
    RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(state, block, eos));
739
8.79k
    return pull(state, block, eos);
740
8.80k
}
741
742
template <typename LocalStateType>
743
Status StatefulOperatorX<LocalStateType>::get_block_impl(RuntimeState* state, Block* block,
744
482k
                                                         bool* eos) {
745
482k
    auto& local_state = get_local_state(state);
746
482k
    if (need_more_input_data(state)) {
747
450k
        local_state._child_block->clear_column_data(
748
450k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
450k
                        .num_materialized_slots());
750
450k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
450k
                state, local_state._child_block.get(), &local_state._child_eos));
752
450k
        *eos = local_state._child_eos;
753
450k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
71.7k
            return Status::OK();
755
71.7k
        }
756
379k
        {
757
379k
            SCOPED_TIMER(local_state.exec_time_counter());
758
379k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
379k
        }
760
379k
    }
761
762
410k
    if (!need_more_input_data(state)) {
763
384k
        SCOPED_TIMER(local_state.exec_time_counter());
764
384k
        bool new_eos = false;
765
384k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
384k
        if (new_eos) {
767
305k
            *eos = true;
768
305k
        } else if (!need_more_input_data(state)) {
769
24.5k
            *eos = false;
770
24.5k
        }
771
384k
    }
772
410k
    return Status::OK();
773
410k
}
_ZN5doris17StatefulOperatorXINS_23HashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
132k
                                                         bool* eos) {
745
132k
    auto& local_state = get_local_state(state);
746
132k
    if (need_more_input_data(state)) {
747
113k
        local_state._child_block->clear_column_data(
748
113k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
113k
                        .num_materialized_slots());
750
113k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
113k
                state, local_state._child_block.get(), &local_state._child_eos));
752
113k
        *eos = local_state._child_eos;
753
113k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
29.2k
            return Status::OK();
755
29.2k
        }
756
84.3k
        {
757
84.3k
            SCOPED_TIMER(local_state.exec_time_counter());
758
84.3k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
84.3k
        }
760
84.3k
    }
761
762
103k
    if (!need_more_input_data(state)) {
763
103k
        SCOPED_TIMER(local_state.exec_time_counter());
764
103k
        bool new_eos = false;
765
103k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
103k
        if (new_eos) {
767
44.4k
            *eos = true;
768
59.2k
        } else if (!need_more_input_data(state)) {
769
11.9k
            *eos = false;
770
11.9k
        }
771
103k
    }
772
103k
    return Status::OK();
773
103k
}
Unexecuted instantiation: _ZN5doris17StatefulOperatorXINS_34PartitionedHashJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
_ZN5doris17StatefulOperatorXINS_16RepeatLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
4.60k
                                                         bool* eos) {
745
4.60k
    auto& local_state = get_local_state(state);
746
4.60k
    if (need_more_input_data(state)) {
747
2.65k
        local_state._child_block->clear_column_data(
748
2.65k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
2.65k
                        .num_materialized_slots());
750
2.65k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
2.65k
                state, local_state._child_block.get(), &local_state._child_eos));
752
2.65k
        *eos = local_state._child_eos;
753
2.65k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
602
            return Status::OK();
755
602
        }
756
2.05k
        {
757
2.05k
            SCOPED_TIMER(local_state.exec_time_counter());
758
2.05k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
2.05k
        }
760
2.05k
    }
761
762
4.02k
    if (!need_more_input_data(state)) {
763
4.02k
        SCOPED_TIMER(local_state.exec_time_counter());
764
4.02k
        bool new_eos = false;
765
4.02k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
4.02k
        if (new_eos) {
767
1.41k
            *eos = true;
768
2.60k
        } else if (!need_more_input_data(state)) {
769
1.95k
            *eos = false;
770
1.95k
        }
771
4.02k
    }
772
4.00k
    return Status::OK();
773
4.00k
}
_ZN5doris17StatefulOperatorXINS_25MaterializationLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
1.94k
                                                         bool* eos) {
745
1.94k
    auto& local_state = get_local_state(state);
746
1.94k
    if (need_more_input_data(state)) {
747
1.94k
        local_state._child_block->clear_column_data(
748
1.94k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
1.94k
                        .num_materialized_slots());
750
1.94k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
1.94k
                state, local_state._child_block.get(), &local_state._child_eos));
752
1.94k
        *eos = local_state._child_eos;
753
1.94k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
775
            return Status::OK();
755
775
        }
756
1.16k
        {
757
1.16k
            SCOPED_TIMER(local_state.exec_time_counter());
758
1.16k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
1.16k
        }
760
1.16k
    }
761
762
1.16k
    if (!need_more_input_data(state)) {
763
1.16k
        SCOPED_TIMER(local_state.exec_time_counter());
764
1.16k
        bool new_eos = false;
765
1.16k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
1.16k
        if (new_eos) {
767
796
            *eos = true;
768
796
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
1.16k
    }
772
1.16k
    return Status::OK();
773
1.16k
}
_ZN5doris17StatefulOperatorXINS_22StreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
17.5k
                                                         bool* eos) {
745
17.5k
    auto& local_state = get_local_state(state);
746
17.5k
    if (need_more_input_data(state)) {
747
17.5k
        local_state._child_block->clear_column_data(
748
17.5k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
17.5k
                        .num_materialized_slots());
750
17.5k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
17.5k
                state, local_state._child_block.get(), &local_state._child_eos));
752
17.5k
        *eos = local_state._child_eos;
753
17.5k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
3.08k
            return Status::OK();
755
3.08k
        }
756
14.4k
        {
757
14.4k
            SCOPED_TIMER(local_state.exec_time_counter());
758
14.4k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
14.4k
        }
760
14.4k
    }
761
762
14.4k
    if (!need_more_input_data(state)) {
763
6.11k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.11k
        bool new_eos = false;
765
6.11k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.11k
        if (new_eos) {
767
6.04k
            *eos = true;
768
6.04k
        } else if (!need_more_input_data(state)) {
769
7
            *eos = false;
770
7
        }
771
6.11k
    }
772
14.4k
    return Status::OK();
773
14.4k
}
_ZN5doris17StatefulOperatorXINS_30DistinctStreamingAggLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
296k
                                                         bool* eos) {
745
296k
    auto& local_state = get_local_state(state);
746
297k
    if (need_more_input_data(state)) {
747
297k
        local_state._child_block->clear_column_data(
748
297k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
297k
                        .num_materialized_slots());
750
297k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
297k
                state, local_state._child_block.get(), &local_state._child_eos));
752
297k
        *eos = local_state._child_eos;
753
297k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
36.1k
            return Status::OK();
755
36.1k
        }
756
261k
        {
757
261k
            SCOPED_TIMER(local_state.exec_time_counter());
758
261k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
261k
        }
760
261k
    }
761
762
260k
    if (!need_more_input_data(state)) {
763
243k
        SCOPED_TIMER(local_state.exec_time_counter());
764
243k
        bool new_eos = false;
765
243k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
243k
        if (new_eos) {
767
243k
            *eos = true;
768
243k
        } else if (!need_more_input_data(state)) {
769
0
            *eos = false;
770
0
        }
771
243k
    }
772
260k
    return Status::OK();
773
260k
}
_ZN5doris17StatefulOperatorXINS_29NestedLoopJoinProbeLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
20.7k
                                                         bool* eos) {
745
20.7k
    auto& local_state = get_local_state(state);
746
20.7k
    if (need_more_input_data(state)) {
747
10.4k
        local_state._child_block->clear_column_data(
748
10.4k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
10.4k
                        .num_materialized_slots());
750
10.4k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
10.4k
                state, local_state._child_block.get(), &local_state._child_eos));
752
10.4k
        *eos = local_state._child_eos;
753
10.4k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
901
            return Status::OK();
755
901
        }
756
9.57k
        {
757
9.57k
            SCOPED_TIMER(local_state.exec_time_counter());
758
9.57k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
9.57k
        }
760
9.57k
    }
761
762
19.8k
    if (!need_more_input_data(state)) {
763
19.3k
        SCOPED_TIMER(local_state.exec_time_counter());
764
19.3k
        bool new_eos = false;
765
19.3k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
19.3k
        if (new_eos) {
767
5.84k
            *eos = true;
768
13.4k
        } else if (!need_more_input_data(state)) {
769
10.3k
            *eos = false;
770
10.3k
        }
771
19.3k
    }
772
19.8k
    return Status::OK();
773
19.8k
}
_ZN5doris17StatefulOperatorXINS_23TableFunctionLocalStateEE14get_block_implEPNS_12RuntimeStateEPNS_5BlockEPb
Line
Count
Source
744
7.60k
                                                         bool* eos) {
745
7.60k
    auto& local_state = get_local_state(state);
746
7.60k
    if (need_more_input_data(state)) {
747
7.24k
        local_state._child_block->clear_column_data(
748
7.24k
                OperatorX<LocalStateType>::_child->operator_row_desc_after_projection()
749
7.24k
                        .num_materialized_slots());
750
7.24k
        RETURN_IF_ERROR(OperatorX<LocalStateType>::_child->get_block_after_projects(
751
7.24k
                state, local_state._child_block.get(), &local_state._child_eos));
752
7.24k
        *eos = local_state._child_eos;
753
7.24k
        if (local_state._child_block->rows() == 0 && !local_state._child_eos) {
754
1.01k
            return Status::OK();
755
1.01k
        }
756
6.23k
        {
757
6.23k
            SCOPED_TIMER(local_state.exec_time_counter());
758
6.23k
            RETURN_IF_ERROR(push(state, local_state._child_block.get(), local_state._child_eos));
759
6.23k
        }
760
6.23k
    }
761
762
6.59k
    if (!need_more_input_data(state)) {
763
6.59k
        SCOPED_TIMER(local_state.exec_time_counter());
764
6.59k
        bool new_eos = false;
765
6.59k
        RETURN_IF_ERROR(pull(state, block, &new_eos));
766
6.59k
        if (new_eos) {
767
4.33k
            *eos = true;
768
4.33k
        } else if (!need_more_input_data(state)) {
769
366
            *eos = false;
770
366
        }
771
6.59k
    }
772
6.59k
    return Status::OK();
773
6.59k
}
774
775
template <typename Writer, typename Parent>
776
    requires(std::is_base_of_v<AsyncResultWriter, Writer>)
777
47.6k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.6k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.6k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.6k
                                                         "AsyncWriterDependency", true);
781
47.6k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.6k
                             _finish_dependency));
783
784
47.6k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.6k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.6k
    return Status::OK();
787
47.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
357
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
357
    RETURN_IF_ERROR(Base::init(state, info));
779
357
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
357
                                                         "AsyncWriterDependency", true);
781
357
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
357
                             _finish_dependency));
783
784
357
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
357
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
357
    return Status::OK();
787
357
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
47.2k
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
47.2k
    RETURN_IF_ERROR(Base::init(state, info));
779
47.2k
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
47.2k
                                                         "AsyncWriterDependency", true);
781
47.2k
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
47.2k
                             _finish_dependency));
783
784
47.2k
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
47.2k
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
47.2k
    return Status::OK();
787
47.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4initEPNS_12RuntimeStateERNS_18LocalSinkStateInfoE
Line
Count
Source
777
40
Status AsyncWriterSink<Writer, Parent>::init(RuntimeState* state, LocalSinkStateInfo& info) {
778
40
    RETURN_IF_ERROR(Base::init(state, info));
779
40
    _async_writer_dependency = Dependency::create_shared(_parent->operator_id(), _parent->node_id(),
780
40
                                                         "AsyncWriterDependency", true);
781
40
    _writer.reset(new Writer(info.tsink, _output_vexpr_ctxs, _async_writer_dependency,
782
40
                             _finish_dependency));
783
784
40
    _wait_for_dependency_timer = ADD_TIMER_WITH_LEVEL(
785
40
            common_profile(), "WaitForDependency[" + _async_writer_dependency->name() + "]Time", 1);
786
40
    return Status::OK();
787
40
}
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.5k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.5k
    RETURN_IF_ERROR(Base::open(state));
793
48.5k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
375k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
327k
        RETURN_IF_ERROR(
796
327k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
327k
    }
798
48.5k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.5k
    return Status::OK();
800
48.5k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
358
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
358
    RETURN_IF_ERROR(Base::open(state));
793
358
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
1.86k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
1.50k
        RETURN_IF_ERROR(
796
1.50k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
1.50k
    }
798
358
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
358
    return Status::OK();
800
358
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4openEPNS_12RuntimeStateE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
48.1k
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
48.1k
    RETURN_IF_ERROR(Base::open(state));
793
48.1k
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
373k
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
324k
        RETURN_IF_ERROR(
796
324k
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
324k
    }
798
48.1k
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
48.1k
    return Status::OK();
800
48.1k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4openEPNS_12RuntimeStateE
Line
Count
Source
791
40
Status AsyncWriterSink<Writer, Parent>::open(RuntimeState* state) {
792
40
    RETURN_IF_ERROR(Base::open(state));
793
40
    _output_vexpr_ctxs.resize(_parent->cast<Parent>()._output_vexpr_ctxs.size());
794
720
    for (size_t i = 0; i < _output_vexpr_ctxs.size(); i++) {
795
680
        RETURN_IF_ERROR(
796
680
                _parent->cast<Parent>()._output_vexpr_ctxs[i]->clone(state, _output_vexpr_ctxs[i]));
797
680
    }
798
40
    RETURN_IF_ERROR(_writer->start_writer(state, operator_profile()));
799
40
    return Status::OK();
800
40
}
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
64.2k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
64.2k
    return _writer->sink(block, eos);
806
64.2k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
1.16k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
1.16k
    return _writer->sink(block, eos);
806
1.16k
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
63.0k
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
63.0k
    return _writer->sink(block, eos);
806
63.0k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE4sinkEPNS_12RuntimeStateEPNS_5BlockEb
Line
Count
Source
804
40
Status AsyncWriterSink<Writer, Parent>::sink(RuntimeState* state, Block* block, bool eos) {
805
40
    return _writer->sink(block, eos);
806
40
}
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.6k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.6k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.6k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.6k
    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.6k
    if (_writer) {
818
48.6k
        Status st = _writer->get_writer_status();
819
48.6k
        if (exec_status.ok()) {
820
48.6k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.6k
                                                       : Status::Cancelled("force close"));
822
48.6k
        } else {
823
91
            _writer->force_close(exec_status);
824
91
        }
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.6k
        RETURN_IF_ERROR(st);
829
48.6k
    }
830
48.6k
    return Base::close(state, exec_status);
831
48.6k
}
_ZN5doris15AsyncWriterSinkINS_17VFileResultWriterENS_23ResultFileSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
346
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
346
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
346
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
346
    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
346
    if (_writer) {
818
346
        Status st = _writer->get_writer_status();
819
346
        if (exec_status.ok()) {
820
346
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
346
                                                       : Status::Cancelled("force close"));
822
346
        } 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
346
        RETURN_IF_ERROR(st);
829
346
    }
830
346
    return Base::close(state, exec_status);
831
346
}
Unexecuted instantiation: _ZN5doris15AsyncWriterSinkINS_16VJdbcTableWriterENS_22JdbcTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
_ZN5doris15AsyncWriterSinkINS_13VTabletWriterENS_22OlapTableSinkOperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
48.2k
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
48.2k
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
48.2k
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
48.2k
    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.3k
    if (_writer) {
818
48.3k
        Status st = _writer->get_writer_status();
819
48.3k
        if (exec_status.ok()) {
820
48.2k
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
48.2k
                                                       : Status::Cancelled("force close"));
822
48.2k
        } else {
823
91
            _writer->force_close(exec_status);
824
91
        }
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.3k
        RETURN_IF_ERROR(st);
829
48.3k
    }
830
48.2k
    return Base::close(state, exec_status);
831
48.2k
}
_ZN5doris15AsyncWriterSinkINS_15VTabletWriterV2ENS_24OlapTableSinkV2OperatorXEE5closeEPNS_12RuntimeStateENS_6StatusE
Line
Count
Source
810
40
Status AsyncWriterSink<Writer, Parent>::close(RuntimeState* state, Status exec_status) {
811
40
    if (_closed) {
812
0
        return Status::OK();
813
0
    }
814
40
    COUNTER_SET(_wait_for_dependency_timer, _async_writer_dependency->watcher_elapse_time());
815
40
    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
40
    if (_writer) {
818
40
        Status st = _writer->get_writer_status();
819
40
        if (exec_status.ok()) {
820
40
            _writer->force_close(state->is_cancelled() ? state->cancel_reason()
821
40
                                                       : Status::Cancelled("force close"));
822
40
        } 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
40
        RETURN_IF_ERROR(st);
829
40
    }
830
40
    return Base::close(state, exec_status);
831
40
}
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