Coverage Report

Created: 2026-10-14 07:30

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